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=2024-04-01
URI Parameters
Name |
In |
Required |
Type |
Description |
subscriptionId
|
path |
True
|
string
uuid
|
The ID of the target subscription. The value must be an UUID.
|
supportTicketName
|
path |
True
|
string
|
Support ticket name.
|
api-version
|
query |
True
|
string
|
The API version to use for this operation.
|
Request Body
Name |
Required |
Type |
Description |
properties.advancedDiagnosticConsent
|
True
|
Consent
|
Advanced diagnostic consent to be updated on the support ticket.
|
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.enrollmentId
|
|
string
|
Enrollment Id associated with the support ticket.
|
properties.fileWorkspaceName
|
|
string
|
File workspace name.
|
properties.problemScopingQuestions
|
|
string
|
Problem scoping questions associated with the support ticket.
|
properties.problemStartTime
|
|
string
|
Time in UTC (ISO 8601 format) when the problem started.
|
properties.quotaTicketDetails
|
|
QuotaTicketDetails
|
Additional ticket details associated with a quota support ticket request.
|
properties.require24X7Response
|
|
boolean
|
Indicates if this requires a 24x7 response from Azure.
|
properties.secondaryConsent
|
|
SecondaryConsent[]
|
This property indicates secondary consents for the support ticket
|
properties.serviceLevelAgreement
|
|
ServiceLevelAgreement
|
Service Level Agreement information for this support ticket.
|
properties.supportEngineer
|
|
SupportEngineer
|
Information about the support engineer working on this support ticket.
|
properties.supportPlanId
|
|
string
|
Support plan id 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.
|
Responses
Name |
Type |
Description |
200 OK
|
SupportTicketDetails
|
OK - SupportTicket created successfully.
|
202 Accepted
|
|
Accepted, SupportTicket will be created asynchronously.
|
Other Status Codes
|
ErrorResponse
|
Error response describing why the operation failed.
|
Security
azure_auth
Azure Active Directory OAuth2 Flow.
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name |
Description |
user_impersonation
|
impersonate your user account
|
Examples
Sample request
PUT https://management.azure.com/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/supportTickets/testticket?api-version=2024-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",
"supportPlanId": "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=",
"fileWorkspaceName": "6f16735c-1530836f-e9970f1a-2e49-47b7-96cd-9746b83aa066",
"advancedDiagnosticConsent": "No",
"contactDetails": {
"firstName": "abc",
"lastName": "xyz",
"primaryEmailAddress": "abc@contoso.com",
"preferredContactMethod": "email",
"preferredTimeZone": "Pacific Standard Time",
"preferredSupportLanguage": "en-US",
"country": "usa"
}
}
}
from typing import Any, IO, Union
from azure.identity import DefaultAzureCredential
from azure.mgmt.support import MicrosoftSupport
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-support
# USAGE
python create_billing_support_ticket_for_subscription.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = MicrosoftSupport(
credential=DefaultAzureCredential(),
subscription_id="132d901f-189d-4381-9214-fe68e27e05a1",
)
response = client.support_tickets.begin_create(
support_ticket_name="testticket",
create_support_ticket_parameters={
"properties": {
"advancedDiagnosticConsent": "No",
"contactDetails": {
"country": "usa",
"firstName": "abc",
"lastName": "xyz",
"preferredContactMethod": "email",
"preferredSupportLanguage": "en-US",
"preferredTimeZone": "Pacific Standard Time",
"primaryEmailAddress": "abc@contoso.com",
},
"description": "my description",
"fileWorkspaceName": "6f16735c-1530836f-e9970f1a-2e49-47b7-96cd-9746b83aa066",
"problemClassificationId": "/providers/Microsoft.Support/services/billing_service_guid/problemClassifications/billing_problemClassification_guid",
"serviceId": "/providers/Microsoft.Support/services/billing_service_guid",
"severity": "moderate",
"supportPlanId": "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=",
"title": "my title",
}
},
).result()
print(response)
# x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-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/106483d9f698ac3b6c0d481ab0c5fab14152e21f/specification/support/resource-manager/Microsoft.Support/stable/2024-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"),
AdvancedDiagnosticConsent: to.Ptr(armsupport.ConsentNo),
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"),
},
FileWorkspaceName: to.Ptr("6f16735c-1530836f-e9970f1a-2e49-47b7-96cd-9746b83aa066"),
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),
SupportPlanID: to.Ptr("U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw="),
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/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/supportTickets/testticket"),
// Properties: &armsupport.TicketDetailsProperties{
// Description: to.Ptr("my description"),
// AdvancedDiagnosticConsent: to.Ptr(armsupport.ConsentNo),
// 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}()),
// FileWorkspaceName: to.Ptr("6f16735c-1530836f-e9970f1a-2e49-47b7-96cd-9746b83aa066"),
// ModifiedDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-20T21:36:23.000Z"); return t}()),
// ProblemClassificationDisplayName: to.Ptr("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{
// },
// SupportPlanDisplayName: to.Ptr("Premier"),
// SupportPlanID: to.Ptr("U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw="),
// 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/2024-04-01/examples/CreateBillingSupportTicketForSubscription.json
*/
async function createATicketForBillingRelatedIssues() {
const subscriptionId =
process.env["SUPPORT_SUBSCRIPTION_ID"] || "132d901f-189d-4381-9214-fe68e27e05a1";
const supportTicketName = "testticket";
const createSupportTicketParameters = {
description: "my description",
advancedDiagnosticConsent: "No",
contactDetails: {
country: "usa",
firstName: "abc",
lastName: "xyz",
preferredContactMethod: "email",
preferredSupportLanguage: "en-US",
preferredTimeZone: "Pacific Standard Time",
primaryEmailAddress: "abc@contoso.com",
},
fileWorkspaceName: "6f16735c-1530836f-e9970f1a-2e49-47b7-96cd-9746b83aa066",
problemClassificationId:
"/providers/Microsoft.Support/services/billing_service_guid/problemClassifications/billing_problemClassification_guid",
serviceId: "/providers/Microsoft.Support/services/billing_service_guid",
severity: "moderate",
supportPlanId:
"U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=",
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 Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Resources;
using Azure.ResourceManager.Support.Models;
using Azure.ResourceManager.Support;
// Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/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://video2.skills-academy.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 = "132d901f-189d-4381-9214-fe68e27e05a1";
ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId);
SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
// get the collection of this SubscriptionSupportTicketResource
SubscriptionSupportTicketCollection collection = subscriptionResource.GetSubscriptionSupportTickets();
// invoke the operation
string supportTicketName = "testticket";
SupportTicketData data = new SupportTicketData("my description", "/providers/Microsoft.Support/services/billing_service_guid/problemClassifications/billing_problemClassification_guid", SupportSeverityLevel.Moderate, AdvancedDiagnosticConsent.No, new SupportContactProfile("abc", "xyz", PreferredContactMethod.Email, "abc@contoso.com", "Pacific Standard Time", "usa", "en-US"), "my title", "/providers/Microsoft.Support/services/billing_service_guid")
{
SupportPlanId = "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=",
FileWorkspaceName = "6f16735c-1530836f-e9970f1a-2e49-47b7-96cd-9746b83aa066",
};
ArmOperation<SubscriptionSupportTicketResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, supportTicketName, data);
SubscriptionSupportTicketResource 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/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/operationResults/operationid?api-version=2024-04-01
azure-asyncoperation: https://management.azure.com/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/operationsStatus/operationid?api-version=2024-04-01
{
"id": "/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/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,
"advancedDiagnosticConsent": "No",
"supportPlanId": "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=",
"fileWorkspaceName": "6f16735c-1530836f-e9970f1a-2e49-47b7-96cd-9746b83aa066",
"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",
"supportPlanDisplayName": "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/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/supportTickets/testticket?api-version=2024-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",
"supportPlanId": "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=",
"fileWorkspaceName": "6f16735c-1530836f-e9970f1a-2e49-47b7-96cd-9746b83aa066",
"advancedDiagnosticConsent": "No",
"contactDetails": {
"firstName": "abc",
"lastName": "xyz",
"primaryEmailAddress": "abc@contoso.com",
"preferredContactMethod": "email",
"preferredTimeZone": "Pacific Standard Time",
"preferredSupportLanguage": "en-US",
"country": "usa"
}
}
}
from typing import Any, IO, Union
from azure.identity import DefaultAzureCredential
from azure.mgmt.support import MicrosoftSupport
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-support
# USAGE
python create_sub_mgmt_support_ticket_for_subscription.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = MicrosoftSupport(
credential=DefaultAzureCredential(),
subscription_id="132d901f-189d-4381-9214-fe68e27e05a1",
)
response = client.support_tickets.begin_create(
support_ticket_name="testticket",
create_support_ticket_parameters={
"properties": {
"advancedDiagnosticConsent": "No",
"contactDetails": {
"country": "usa",
"firstName": "abc",
"lastName": "xyz",
"preferredContactMethod": "email",
"preferredSupportLanguage": "en-US",
"preferredTimeZone": "Pacific Standard Time",
"primaryEmailAddress": "abc@contoso.com",
},
"description": "my description",
"fileWorkspaceName": "6f16735c-1530836f-e9970f1a-2e49-47b7-96cd-9746b83aa066",
"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",
"supportPlanId": "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=",
"title": "my title",
}
},
).result()
print(response)
# x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-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/106483d9f698ac3b6c0d481ab0c5fab14152e21f/specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CreateSubMgmtSupportTicketForSubscription.json
func ExampleTicketsClient_BeginCreate_createATicketForSubscriptionManagementRelatedIssuesForASubscription() {
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"),
AdvancedDiagnosticConsent: to.Ptr(armsupport.ConsentNo),
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"),
},
FileWorkspaceName: to.Ptr("6f16735c-1530836f-e9970f1a-2e49-47b7-96cd-9746b83aa066"),
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),
SupportPlanID: to.Ptr("U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw="),
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/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/supportTickets/testticket"),
// Properties: &armsupport.TicketDetailsProperties{
// Description: to.Ptr("my description"),
// AdvancedDiagnosticConsent: to.Ptr(armsupport.ConsentNo),
// 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}()),
// FileWorkspaceName: to.Ptr("6f16735c-1530836f-e9970f1a-2e49-47b7-96cd-9746b83aa066"),
// ModifiedDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-20T21:36:23.000Z"); return t}()),
// ProblemClassificationDisplayName: to.Ptr("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{
// },
// SupportPlanDisplayName: to.Ptr("Premier"),
// SupportPlanID: to.Ptr("U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw="),
// 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/2024-04-01/examples/CreateSubMgmtSupportTicketForSubscription.json
*/
async function createATicketForSubscriptionManagementRelatedIssuesForASubscription() {
const subscriptionId =
process.env["SUPPORT_SUBSCRIPTION_ID"] || "132d901f-189d-4381-9214-fe68e27e05a1";
const supportTicketName = "testticket";
const createSupportTicketParameters = {
description: "my description",
advancedDiagnosticConsent: "No",
contactDetails: {
country: "usa",
firstName: "abc",
lastName: "xyz",
preferredContactMethod: "email",
preferredSupportLanguage: "en-US",
preferredTimeZone: "Pacific Standard Time",
primaryEmailAddress: "abc@contoso.com",
},
fileWorkspaceName: "6f16735c-1530836f-e9970f1a-2e49-47b7-96cd-9746b83aa066",
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",
supportPlanId:
"U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=",
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 Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Resources;
using Azure.ResourceManager.Support.Models;
using Azure.ResourceManager.Support;
// Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/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://video2.skills-academy.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 = "132d901f-189d-4381-9214-fe68e27e05a1";
ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId);
SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
// get the collection of this SubscriptionSupportTicketResource
SubscriptionSupportTicketCollection collection = subscriptionResource.GetSubscriptionSupportTickets();
// invoke the operation
string supportTicketName = "testticket";
SupportTicketData data = new SupportTicketData("my description", "/providers/Microsoft.Support/services/subscription_management_service_guid/problemClassifications/subscription_management_problemClassification_guid", SupportSeverityLevel.Moderate, AdvancedDiagnosticConsent.No, new SupportContactProfile("abc", "xyz", PreferredContactMethod.Email, "abc@contoso.com", "Pacific Standard Time", "usa", "en-US"), "my title", "/providers/Microsoft.Support/services/subscription_management_service_guid")
{
SupportPlanId = "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=",
FileWorkspaceName = "6f16735c-1530836f-e9970f1a-2e49-47b7-96cd-9746b83aa066",
};
ArmOperation<SubscriptionSupportTicketResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, supportTicketName, data);
SubscriptionSupportTicketResource 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/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/operationResults/operationid?api-version=2024-04-01
azure-asyncoperation: https://management.azure.com/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/operationsStatus/operationid?api-version=2024-04-01
{
"id": "/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/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,
"advancedDiagnosticConsent": "No",
"supportPlanId": "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=",
"fileWorkspaceName": "6f16735c-1530836f-e9970f1a-2e49-47b7-96cd-9746b83aa066",
"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",
"supportPlanDisplayName": "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/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/supportTickets/testticket?api-version=2024-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",
"advancedDiagnosticConsent": "Yes",
"supportPlanId": "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=",
"fileWorkspaceName": "6f16735c-1530836f-e9970f1a-2e49-47b7-96cd-9746b83aa066",
"problemScopingQuestions": "{\"articleId\":\"076846c1-4c0b-4b21-91c6-1a30246b3867\",\"scopingDetails\":[{\"question\":\"When did the problem begin?\",\"controlId\":\"problem_start_time\",\"orderId\":1,\"inputType\":\"static\",\"answer\":{\"displayValue\":\"2023-08-31T18:55:00.739Z\",\"value\":\"2023-08-31T18:55:00.739Z\",\"type\":\"datetime\"}},{\"question\":\"API Type of the Cosmos DB account\",\"controlId\":\"api_type\",\"orderId\":2,\"inputType\":\"static\",\"answer\":{\"displayValue\":\"Table\",\"value\":\"tables\",\"type\":\"string\"}},{\"question\":\"Table name\",\"controlId\":\"collection_name_table\",\"orderId\":11,\"inputType\":\"nonstatic\",\"answer\":{\"displayValue\":\"Select Table Name\",\"value\":\"dont_know_answer\",\"type\":\"string\"}},{\"question\":\"Provide additional details about the issue you're facing\",\"controlId\":\"problem_description\",\"orderId\":12,\"inputType\":\"nonstatic\",\"answer\":{\"displayValue\":\"test ticket, please ignore and close\",\"value\":\"test ticket, please ignore and close\",\"type\":\"string\"}}]}",
"secondaryConsent": [
{
"userConsent": "Yes",
"type": "virtualmachinerunninglinuxservice"
}
],
"contactDetails": {
"firstName": "abc",
"lastName": "xyz",
"primaryEmailAddress": "abc@contoso.com",
"preferredContactMethod": "email",
"preferredTimeZone": "Pacific Standard Time",
"preferredSupportLanguage": "en-US",
"country": "usa"
},
"technicalTicketDetails": {
"resourceId": "/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/resourceGroups/test/providers/Microsoft.Compute/virtualMachines/testserver"
}
}
}
from typing import Any, IO, Union
from azure.identity import DefaultAzureCredential
from azure.mgmt.support import MicrosoftSupport
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-support
# USAGE
python create_technical_support_ticket_for_subscription.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = MicrosoftSupport(
credential=DefaultAzureCredential(),
subscription_id="132d901f-189d-4381-9214-fe68e27e05a1",
)
response = client.support_tickets.begin_create(
support_ticket_name="testticket",
create_support_ticket_parameters={
"properties": {
"advancedDiagnosticConsent": "Yes",
"contactDetails": {
"country": "usa",
"firstName": "abc",
"lastName": "xyz",
"preferredContactMethod": "email",
"preferredSupportLanguage": "en-US",
"preferredTimeZone": "Pacific Standard Time",
"primaryEmailAddress": "abc@contoso.com",
},
"description": "my description",
"fileWorkspaceName": "6f16735c-1530836f-e9970f1a-2e49-47b7-96cd-9746b83aa066",
"problemClassificationId": "/providers/Microsoft.Support/services/virtual_machine_running_linux_service_guid/problemClassifications/problemClassification_guid",
"problemScopingQuestions": '{"articleId":"076846c1-4c0b-4b21-91c6-1a30246b3867","scopingDetails":[{"question":"When did the problem begin?","controlId":"problem_start_time","orderId":1,"inputType":"static","answer":{"displayValue":"2023-08-31T18:55:00.739Z","value":"2023-08-31T18:55:00.739Z","type":"datetime"}},{"question":"API Type of the Cosmos DB account","controlId":"api_type","orderId":2,"inputType":"static","answer":{"displayValue":"Table","value":"tables","type":"string"}},{"question":"Table name","controlId":"collection_name_table","orderId":11,"inputType":"nonstatic","answer":{"displayValue":"Select Table Name","value":"dont_know_answer","type":"string"}},{"question":"Provide additional details about the issue you\'re facing","controlId":"problem_description","orderId":12,"inputType":"nonstatic","answer":{"displayValue":"test ticket, please ignore and close","value":"test ticket, please ignore and close","type":"string"}}]}',
"secondaryConsent": [{"type": "virtualmachinerunninglinuxservice", "userConsent": "Yes"}],
"serviceId": "/providers/Microsoft.Support/services/cddd3eb5-1830-b494-44fd-782f691479dc",
"severity": "moderate",
"supportPlanId": "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=",
"technicalTicketDetails": {
"resourceId": "/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/resourceGroups/test/providers/Microsoft.Compute/virtualMachines/testserver"
},
"title": "my title",
}
},
).result()
print(response)
# x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-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/106483d9f698ac3b6c0d481ab0c5fab14152e21f/specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CreateTechnicalSupportTicketForSubscription.json
func ExampleTicketsClient_BeginCreate_createATicketForTechnicalIssueRelatedToASpecificResourceForASubscription() {
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"),
AdvancedDiagnosticConsent: to.Ptr(armsupport.ConsentYes),
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"),
},
FileWorkspaceName: to.Ptr("6f16735c-1530836f-e9970f1a-2e49-47b7-96cd-9746b83aa066"),
ProblemClassificationID: to.Ptr("/providers/Microsoft.Support/services/virtual_machine_running_linux_service_guid/problemClassifications/problemClassification_guid"),
ProblemScopingQuestions: to.Ptr("{\"articleId\":\"076846c1-4c0b-4b21-91c6-1a30246b3867\",\"scopingDetails\":[{\"question\":\"When did the problem begin?\",\"controlId\":\"problem_start_time\",\"orderId\":1,\"inputType\":\"static\",\"answer\":{\"displayValue\":\"2023-08-31T18:55:00.739Z\",\"value\":\"2023-08-31T18:55:00.739Z\",\"type\":\"datetime\"}},{\"question\":\"API Type of the Cosmos DB account\",\"controlId\":\"api_type\",\"orderId\":2,\"inputType\":\"static\",\"answer\":{\"displayValue\":\"Table\",\"value\":\"tables\",\"type\":\"string\"}},{\"question\":\"Table name\",\"controlId\":\"collection_name_table\",\"orderId\":11,\"inputType\":\"nonstatic\",\"answer\":{\"displayValue\":\"Select Table Name\",\"value\":\"dont_know_answer\",\"type\":\"string\"}},{\"question\":\"Provide additional details about the issue you're facing\",\"controlId\":\"problem_description\",\"orderId\":12,\"inputType\":\"nonstatic\",\"answer\":{\"displayValue\":\"test ticket, please ignore and close\",\"value\":\"test ticket, please ignore and close\",\"type\":\"string\"}}]}"),
SecondaryConsent: []*armsupport.SecondaryConsent{
{
Type: to.Ptr("virtualmachinerunninglinuxservice"),
UserConsent: to.Ptr(armsupport.UserConsentYes),
}},
ServiceID: to.Ptr("/providers/Microsoft.Support/services/cddd3eb5-1830-b494-44fd-782f691479dc"),
Severity: to.Ptr(armsupport.SeverityLevelModerate),
SupportPlanID: to.Ptr("U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw="),
TechnicalTicketDetails: &armsupport.TechnicalTicketDetails{
ResourceID: to.Ptr("/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/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/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/supportTickets/testticket"),
// Properties: &armsupport.TicketDetailsProperties{
// Description: to.Ptr("my description"),
// AdvancedDiagnosticConsent: to.Ptr(armsupport.ConsentYes),
// 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}()),
// FileWorkspaceName: to.Ptr("6f16735c-1530836f-e9970f1a-2e49-47b7-96cd-9746b83aa066"),
// ModifiedDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-20T21:36:23.000Z"); return t}()),
// ProblemClassificationDisplayName: to.Ptr("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"),
// ProblemScopingQuestions: to.Ptr("{\"articleId\":\"076846c1-4c0b-4b21-91c6-1a30246b3867\",\"scopingDetails\":[{\"question\":\"When did the problem begin?\",\"controlId\":\"problem_start_time\",\"orderId\":1,\"inputType\":\"static\",\"answer\":{\"displayValue\":\"2023-08-31T18:55:00.739Z\",\"value\":\"2023-08-31T18:55:00.739Z\",\"type\":\"datetime\"}},{\"question\":\"API Type of the Cosmos DB account\",\"controlId\":\"api_type\",\"orderId\":2,\"inputType\":\"static\",\"answer\":{\"displayValue\":\"Table\",\"value\":\"tables\",\"type\":\"string\"}},{\"question\":\"Table name\",\"controlId\":\"collection_name_table\",\"orderId\":11,\"inputType\":\"nonstatic\",\"answer\":{\"displayValue\":\"Select Table Name\",\"value\":\"dont_know_answer\",\"type\":\"string\"}},{\"question\":\"Provide additional details about the issue you're facing\",\"controlId\":\"problem_description\",\"orderId\":12,\"inputType\":\"nonstatic\",\"answer\":{\"displayValue\":\"test ticket, please ignore and close\",\"value\":\"test ticket, please ignore and close\",\"type\":\"string\"}}]}"),
// Require24X7Response: to.Ptr(false),
// SecondaryConsent: []*armsupport.SecondaryConsent{
// {
// Type: to.Ptr("virtualmachinerunninglinuxservice"),
// UserConsent: to.Ptr(armsupport.UserConsentYes),
// }},
// 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{
// },
// SupportPlanDisplayName: to.Ptr("Premier"),
// SupportPlanID: to.Ptr("U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw="),
// SupportPlanType: to.Ptr("Premier"),
// SupportTicketID: to.Ptr("119120321001170"),
// TechnicalTicketDetails: &armsupport.TechnicalTicketDetails{
// ResourceID: to.Ptr("/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/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/2024-04-01/examples/CreateTechnicalSupportTicketForSubscription.json
*/
async function createATicketForTechnicalIssueRelatedToASpecificResourceForASubscription() {
const subscriptionId =
process.env["SUPPORT_SUBSCRIPTION_ID"] || "132d901f-189d-4381-9214-fe68e27e05a1";
const supportTicketName = "testticket";
const createSupportTicketParameters = {
description: "my description",
advancedDiagnosticConsent: "Yes",
contactDetails: {
country: "usa",
firstName: "abc",
lastName: "xyz",
preferredContactMethod: "email",
preferredSupportLanguage: "en-US",
preferredTimeZone: "Pacific Standard Time",
primaryEmailAddress: "abc@contoso.com",
},
fileWorkspaceName: "6f16735c-1530836f-e9970f1a-2e49-47b7-96cd-9746b83aa066",
problemClassificationId:
"/providers/Microsoft.Support/services/virtual_machine_running_linux_service_guid/problemClassifications/problemClassification_guid",
problemScopingQuestions:
'{"articleId":"076846c1-4c0b-4b21-91c6-1a30246b3867","scopingDetails":[{"question":"When did the problem begin?","controlId":"problem_start_time","orderId":1,"inputType":"static","answer":{"displayValue":"2023-08-31T18:55:00.739Z","value":"2023-08-31T18:55:00.739Z","type":"datetime"}},{"question":"API Type of the Cosmos DB account","controlId":"api_type","orderId":2,"inputType":"static","answer":{"displayValue":"Table","value":"tables","type":"string"}},{"question":"Table name","controlId":"collection_name_table","orderId":11,"inputType":"nonstatic","answer":{"displayValue":"Select Table Name","value":"dont_know_answer","type":"string"}},{"question":"Provide additional details about the issue you\'re facing","controlId":"problem_description","orderId":12,"inputType":"nonstatic","answer":{"displayValue":"test ticket, please ignore and close","value":"test ticket, please ignore and close","type":"string"}}]}',
secondaryConsent: [{ type: "virtualmachinerunninglinuxservice", userConsent: "Yes" }],
serviceId: "/providers/Microsoft.Support/services/cddd3eb5-1830-b494-44fd-782f691479dc",
severity: "moderate",
supportPlanId:
"U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=",
technicalTicketDetails: {
resourceId:
"/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/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 Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Resources;
using Azure.ResourceManager.Support.Models;
using Azure.ResourceManager.Support;
// Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/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://video2.skills-academy.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 = "132d901f-189d-4381-9214-fe68e27e05a1";
ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId);
SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
// get the collection of this SubscriptionSupportTicketResource
SubscriptionSupportTicketCollection collection = subscriptionResource.GetSubscriptionSupportTickets();
// invoke the operation
string supportTicketName = "testticket";
SupportTicketData data = new SupportTicketData("my description", "/providers/Microsoft.Support/services/virtual_machine_running_linux_service_guid/problemClassifications/problemClassification_guid", SupportSeverityLevel.Moderate, AdvancedDiagnosticConsent.Yes, new SupportContactProfile("abc", "xyz", PreferredContactMethod.Email, "abc@contoso.com", "Pacific Standard Time", "usa", "en-US"), "my title", "/providers/Microsoft.Support/services/cddd3eb5-1830-b494-44fd-782f691479dc")
{
ProblemScopingQuestions = "{\"articleId\":\"076846c1-4c0b-4b21-91c6-1a30246b3867\",\"scopingDetails\":[{\"question\":\"When did the problem begin?\",\"controlId\":\"problem_start_time\",\"orderId\":1,\"inputType\":\"static\",\"answer\":{\"displayValue\":\"2023-08-31T18:55:00.739Z\",\"value\":\"2023-08-31T18:55:00.739Z\",\"type\":\"datetime\"}},{\"question\":\"API Type of the Cosmos DB account\",\"controlId\":\"api_type\",\"orderId\":2,\"inputType\":\"static\",\"answer\":{\"displayValue\":\"Table\",\"value\":\"tables\",\"type\":\"string\"}},{\"question\":\"Table name\",\"controlId\":\"collection_name_table\",\"orderId\":11,\"inputType\":\"nonstatic\",\"answer\":{\"displayValue\":\"Select Table Name\",\"value\":\"dont_know_answer\",\"type\":\"string\"}},{\"question\":\"Provide additional details about the issue you're facing\",\"controlId\":\"problem_description\",\"orderId\":12,\"inputType\":\"nonstatic\",\"answer\":{\"displayValue\":\"test ticket, please ignore and close\",\"value\":\"test ticket, please ignore and close\",\"type\":\"string\"}}]}",
SupportPlanId = "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=",
FileWorkspaceName = "6f16735c-1530836f-e9970f1a-2e49-47b7-96cd-9746b83aa066",
TechnicalTicketDetailsResourceId = new ResourceIdentifier("/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/resourceGroups/test/providers/Microsoft.Compute/virtualMachines/testserver"),
SecondaryConsent =
{
new SecondaryConsent()
{
UserConsent = UserConsent.Yes,
SecondaryConsentType = "virtualmachinerunninglinuxservice",
}
},
};
ArmOperation<SubscriptionSupportTicketResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, supportTicketName, data);
SubscriptionSupportTicketResource 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/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/operationResults/operationid?api-version=2024-04-01
azure-asyncoperation: https://management.azure.com/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/operationsStatus/operationid?api-version=2024-04-01
{
"id": "/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/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,
"advancedDiagnosticConsent": "Yes",
"supportPlanId": "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=",
"fileWorkspaceName": "6f16735c-1530836f-e9970f1a-2e49-47b7-96cd-9746b83aa066",
"problemScopingQuestions": "{\"articleId\":\"076846c1-4c0b-4b21-91c6-1a30246b3867\",\"scopingDetails\":[{\"question\":\"When did the problem begin?\",\"controlId\":\"problem_start_time\",\"orderId\":1,\"inputType\":\"static\",\"answer\":{\"displayValue\":\"2023-08-31T18:55:00.739Z\",\"value\":\"2023-08-31T18:55:00.739Z\",\"type\":\"datetime\"}},{\"question\":\"API Type of the Cosmos DB account\",\"controlId\":\"api_type\",\"orderId\":2,\"inputType\":\"static\",\"answer\":{\"displayValue\":\"Table\",\"value\":\"tables\",\"type\":\"string\"}},{\"question\":\"Table name\",\"controlId\":\"collection_name_table\",\"orderId\":11,\"inputType\":\"nonstatic\",\"answer\":{\"displayValue\":\"Select Table Name\",\"value\":\"dont_know_answer\",\"type\":\"string\"}},{\"question\":\"Provide additional details about the issue you're facing\",\"controlId\":\"problem_description\",\"orderId\":12,\"inputType\":\"nonstatic\",\"answer\":{\"displayValue\":\"test ticket, please ignore and close\",\"value\":\"test ticket, please ignore and close\",\"type\":\"string\"}}]}",
"secondaryConsent": [
{
"userConsent": "Yes",
"type": "virtualmachinerunninglinuxservice"
}
],
"contactDetails": {
"firstName": "abc",
"lastName": "xyz",
"preferredContactMethod": "email",
"primaryEmailAddress": "abc@contoso.com",
"preferredTimeZone": "Pacific Standard Time",
"country": "usa",
"preferredSupportLanguage": "en-US"
},
"technicalTicketDetails": {
"resourceId": "/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/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",
"supportPlanDisplayName": "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/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/supportTickets/testticket?api-version=2024-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",
"advancedDiagnosticConsent": "Yes",
"supportPlanId": "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=",
"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 typing import Any, IO, Union
from azure.identity import DefaultAzureCredential
from azure.mgmt.support import MicrosoftSupport
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-support
# USAGE
python create_batch_quota_ticket_for_specific_batch_account_for_active_jobs.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = MicrosoftSupport(
credential=DefaultAzureCredential(),
subscription_id="132d901f-189d-4381-9214-fe68e27e05a1",
)
response = client.support_tickets.begin_create(
support_ticket_name="testticket",
create_support_ticket_parameters={
"properties": {
"advancedDiagnosticConsent": "Yes",
"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",
"supportPlanId": "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=",
"title": "my title",
}
},
).result()
print(response)
# x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-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/106483d9f698ac3b6c0d481ab0c5fab14152e21f/specification/support/resource-manager/Microsoft.Support/stable/2024-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"),
AdvancedDiagnosticConsent: to.Ptr(armsupport.ConsentYes),
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),
SupportPlanID: to.Ptr("U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw="),
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/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/supportTickets/testticket"),
// Properties: &armsupport.TicketDetailsProperties{
// Description: to.Ptr("my description"),
// AdvancedDiagnosticConsent: to.Ptr(armsupport.ConsentYes),
// 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}()),
// FileWorkspaceName: to.Ptr("testticket"),
// 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{
// },
// SupportPlanDisplayName: to.Ptr("Premier"),
// SupportPlanID: to.Ptr("U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw="),
// 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/2024-04-01/examples/CreateBatchQuotaTicketForSpecificBatchAccountForActiveJobs.json
*/
async function createATicketToRequestQuotaIncreaseForActiveJobsAndJobSchedulesForABatchAccount() {
const subscriptionId =
process.env["SUPPORT_SUBSCRIPTION_ID"] || "132d901f-189d-4381-9214-fe68e27e05a1";
const supportTicketName = "testticket";
const createSupportTicketParameters = {
description: "my description",
advancedDiagnosticConsent: "Yes",
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",
supportPlanId:
"U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=",
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 Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Resources;
using Azure.ResourceManager.Support.Models;
using Azure.ResourceManager.Support;
// Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/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://video2.skills-academy.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 = "132d901f-189d-4381-9214-fe68e27e05a1";
ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId);
SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
// get the collection of this SubscriptionSupportTicketResource
SubscriptionSupportTicketCollection collection = subscriptionResource.GetSubscriptionSupportTickets();
// invoke the operation
string supportTicketName = "testticket";
SupportTicketData data = new SupportTicketData("my description", "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid", SupportSeverityLevel.Moderate, AdvancedDiagnosticConsent.Yes, new SupportContactProfile("abc", "xyz", PreferredContactMethod.Email, "abc@contoso.com", "Pacific Standard Time", "usa", "en-US"), "my title", "/providers/Microsoft.Support/services/quota_service_guid")
{
SupportPlanId = "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=",
QuotaTicketDetails = new QuotaTicketDetails()
{
QuotaChangeRequestSubType = "Account",
QuotaChangeRequestVersion = "1.0",
QuotaChangeRequests =
{
new SupportQuotaChangeContent()
{
Region = "EastUS",
Payload = "{\"AccountName\":\"test\",\"NewLimit\":200,\"Type\":\"Jobs\"}",
}
},
},
};
ArmOperation<SubscriptionSupportTicketResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, supportTicketName, data);
SubscriptionSupportTicketResource 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.Consent;
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.SecondaryConsent;
import com.azure.resourcemanager.support.models.SeverityLevel;
import com.azure.resourcemanager.support.models.TechnicalTicketDetails;
import com.azure.resourcemanager.support.models.UserConsent;
import java.util.Arrays;
/**
* Samples for SupportTickets Create.
*/
public final class Main {
/*
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-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).withAdvancedDiagnosticConsent(Consent.YES)
.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")
.withSupportPlanId(
"U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=")
.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/2024-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).withAdvancedDiagnosticConsent(Consent.YES)
.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/2024-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).withAdvancedDiagnosticConsent(Consent.YES)
.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")
.withSupportPlanId(
"U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=")
.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/2024-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).withAdvancedDiagnosticConsent(Consent.YES)
.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")
.withSupportPlanId(
"U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=")
.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/2024-04-01/examples/
* CreateSubMgmtSupportTicketForSubscription.json
*/
/**
* Sample code: Create a ticket for Subscription Management related issues for a subscription.
*
* @param manager Entry point to SupportManager.
*/
public static void createATicketForSubscriptionManagementRelatedIssuesForASubscription(
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).withAdvancedDiagnosticConsent(Consent.NO)
.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")
.withSupportPlanId(
"U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=")
.withFileWorkspaceName("6f16735c-1530836f-e9970f1a-2e49-47b7-96cd-9746b83aa066").create();
}
/*
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/
* CreateTechnicalSupportTicketForSubscription.json
*/
/**
* Sample code: Create a ticket for Technical issue related to a specific resource for a subscription.
*
* @param manager Entry point to SupportManager.
*/
public static void createATicketForTechnicalIssueRelatedToASpecificResourceForASubscription(
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).withAdvancedDiagnosticConsent(Consent.YES)
.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")
.withProblemScopingQuestions(
"{\"articleId\":\"076846c1-4c0b-4b21-91c6-1a30246b3867\",\"scopingDetails\":[{\"question\":\"When did the problem begin?\",\"controlId\":\"problem_start_time\",\"orderId\":1,\"inputType\":\"static\",\"answer\":{\"displayValue\":\"2023-08-31T18:55:00.739Z\",\"value\":\"2023-08-31T18:55:00.739Z\",\"type\":\"datetime\"}},{\"question\":\"API Type of the Cosmos DB account\",\"controlId\":\"api_type\",\"orderId\":2,\"inputType\":\"static\",\"answer\":{\"displayValue\":\"Table\",\"value\":\"tables\",\"type\":\"string\"}},{\"question\":\"Table name\",\"controlId\":\"collection_name_table\",\"orderId\":11,\"inputType\":\"nonstatic\",\"answer\":{\"displayValue\":\"Select Table Name\",\"value\":\"dont_know_answer\",\"type\":\"string\"}},{\"question\":\"Provide additional details about the issue you're facing\",\"controlId\":\"problem_description\",\"orderId\":12,\"inputType\":\"nonstatic\",\"answer\":{\"displayValue\":\"test ticket, please ignore and close\",\"value\":\"test ticket, please ignore and close\",\"type\":\"string\"}}]}")
.withSupportPlanId(
"U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=")
.withFileWorkspaceName("6f16735c-1530836f-e9970f1a-2e49-47b7-96cd-9746b83aa066")
.withTechnicalTicketDetails(new TechnicalTicketDetails().withResourceId(
"/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/resourceGroups/test/providers/Microsoft.Compute/virtualMachines/testserver"))
.withSecondaryConsent(Arrays.asList(
new SecondaryConsent().withUserConsent(UserConsent.YES).withType("virtualmachinerunninglinuxservice")))
.create();
}
/*
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-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).withAdvancedDiagnosticConsent(Consent.YES)
.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")
.withSupportPlanId(
"U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=")
.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/2024-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).withAdvancedDiagnosticConsent(Consent.YES)
.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")
.withSupportPlanId(
"U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=")
.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/2024-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).withAdvancedDiagnosticConsent(Consent.YES)
.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")
.withSupportPlanId(
"U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=")
.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/2024-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).withAdvancedDiagnosticConsent(Consent.NO)
.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")
.withSupportPlanId(
"U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=")
.withFileWorkspaceName("6f16735c-1530836f-e9970f1a-2e49-47b7-96cd-9746b83aa066").create();
}
/*
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-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).withAdvancedDiagnosticConsent(Consent.YES)
.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")
.withSupportPlanId(
"U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=")
.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/2024-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).withAdvancedDiagnosticConsent(Consent.YES)
.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")
.withSupportPlanId(
"U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=")
.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/2024-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).withAdvancedDiagnosticConsent(Consent.YES)
.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")
.withSupportPlanId(
"U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=")
.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/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/operationResults/operationid?api-version=2024-04-01
azure-asyncoperation: https://management.azure.com/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/operationsStatus/operationid?api-version=2024-04-01
{
"id": "/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/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,
"advancedDiagnosticConsent": "Yes",
"supportPlanId": "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=",
"fileWorkspaceName": "testticket",
"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",
"supportPlanDisplayName": "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 SQL managed instance
Sample request
PUT https://management.azure.com/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/supportTickets/testticket?api-version=2024-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",
"advancedDiagnosticConsent": "Yes",
"supportPlanId": "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=",
"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 typing import Any, IO, Union
from azure.identity import DefaultAzureCredential
from azure.mgmt.support import MicrosoftSupport
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-support
# USAGE
python create_sql_managed_instance_quota_ticket.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = MicrosoftSupport(
credential=DefaultAzureCredential(),
subscription_id="132d901f-189d-4381-9214-fe68e27e05a1",
)
response = client.support_tickets.begin_create(
support_ticket_name="testticket",
create_support_ticket_parameters={
"properties": {
"advancedDiagnosticConsent": "Yes",
"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",
"supportPlanId": "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=",
"title": "my title",
}
},
).result()
print(response)
# x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-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/106483d9f698ac3b6c0d481ab0c5fab14152e21f/specification/support/resource-manager/Microsoft.Support/stable/2024-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"),
AdvancedDiagnosticConsent: to.Ptr(armsupport.ConsentYes),
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),
SupportPlanID: to.Ptr("U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw="),
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/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/supportTickets/testticket"),
// Properties: &armsupport.TicketDetailsProperties{
// Description: to.Ptr("my description"),
// AdvancedDiagnosticConsent: to.Ptr(armsupport.ConsentYes),
// 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}()),
// FileWorkspaceName: to.Ptr("testticket"),
// 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{
// },
// SupportPlanDisplayName: to.Ptr("Premier"),
// SupportPlanID: to.Ptr("U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw="),
// 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/2024-04-01/examples/CreateSqlManagedInstanceQuotaTicket.json
*/
async function createATicketToRequestQuotaIncreaseForAzureSqlManagedInstance() {
const subscriptionId =
process.env["SUPPORT_SUBSCRIPTION_ID"] || "132d901f-189d-4381-9214-fe68e27e05a1";
const supportTicketName = "testticket";
const createSupportTicketParameters = {
description: "my description",
advancedDiagnosticConsent: "Yes",
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",
supportPlanId:
"U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=",
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 Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Resources;
using Azure.ResourceManager.Support.Models;
using Azure.ResourceManager.Support;
// Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/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://video2.skills-academy.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 = "132d901f-189d-4381-9214-fe68e27e05a1";
ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId);
SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
// get the collection of this SubscriptionSupportTicketResource
SubscriptionSupportTicketCollection collection = subscriptionResource.GetSubscriptionSupportTickets();
// invoke the operation
string supportTicketName = "testticket";
SupportTicketData data = new SupportTicketData("my description", "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_managedinstance_problemClassification_guid", SupportSeverityLevel.Moderate, AdvancedDiagnosticConsent.Yes, new SupportContactProfile("abc", "xyz", PreferredContactMethod.Email, "abc@contoso.com", "Pacific Standard Time", "usa", "en-US"), "my title", "/providers/Microsoft.Support/services/quota_service_guid")
{
SupportPlanId = "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=",
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<SubscriptionSupportTicketResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, supportTicketName, data);
SubscriptionSupportTicketResource 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/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/operationResults/operationid?api-version=2024-04-01
azure-asyncoperation: https://management.azure.com/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/operationsStatus/operationid?api-version=2024-04-01
{
"id": "/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/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,
"advancedDiagnosticConsent": "Yes",
"supportPlanId": "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=",
"fileWorkspaceName": "testticket",
"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",
"supportPlanDisplayName": "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/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/supportTickets/testticket?api-version=2024-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",
"advancedDiagnosticConsent": "Yes",
"supportPlanId": "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=",
"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 typing import Any, IO, Union
from azure.identity import DefaultAzureCredential
from azure.mgmt.support import MicrosoftSupport
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-support
# USAGE
python create_batch_quota_ticket_for_subscription.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = MicrosoftSupport(
credential=DefaultAzureCredential(),
subscription_id="132d901f-189d-4381-9214-fe68e27e05a1",
)
response = client.support_tickets.begin_create(
support_ticket_name="testticket",
create_support_ticket_parameters={
"properties": {
"advancedDiagnosticConsent": "Yes",
"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",
"supportPlanId": "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=",
"title": "my title",
}
},
).result()
print(response)
# x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-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/106483d9f698ac3b6c0d481ab0c5fab14152e21f/specification/support/resource-manager/Microsoft.Support/stable/2024-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"),
AdvancedDiagnosticConsent: to.Ptr(armsupport.ConsentYes),
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),
SupportPlanID: to.Ptr("U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw="),
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/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/supportTickets/testticket"),
// Properties: &armsupport.TicketDetailsProperties{
// Description: to.Ptr("my description"),
// AdvancedDiagnosticConsent: to.Ptr(armsupport.ConsentYes),
// 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}()),
// FileWorkspaceName: to.Ptr("testticket"),
// 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{
// },
// SupportPlanDisplayName: to.Ptr("Premier"),
// SupportPlanID: to.Ptr("U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw="),
// 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/2024-04-01/examples/CreateBatchQuotaTicketForSubscription.json
*/
async function createATicketToRequestQuotaIncreaseForBatchAccountsForASubscription() {
const subscriptionId =
process.env["SUPPORT_SUBSCRIPTION_ID"] || "132d901f-189d-4381-9214-fe68e27e05a1";
const supportTicketName = "testticket";
const createSupportTicketParameters = {
description: "my description",
advancedDiagnosticConsent: "Yes",
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",
supportPlanId:
"U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=",
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 Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Resources;
using Azure.ResourceManager.Support.Models;
using Azure.ResourceManager.Support;
// Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/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://video2.skills-academy.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 = "132d901f-189d-4381-9214-fe68e27e05a1";
ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId);
SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
// get the collection of this SubscriptionSupportTicketResource
SubscriptionSupportTicketCollection collection = subscriptionResource.GetSubscriptionSupportTickets();
// invoke the operation
string supportTicketName = "testticket";
SupportTicketData data = new SupportTicketData("my description", "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid", SupportSeverityLevel.Moderate, AdvancedDiagnosticConsent.Yes, new SupportContactProfile("abc", "xyz", PreferredContactMethod.Email, "abc@contoso.com", "Pacific Standard Time", "usa", "en-US"), "my title", "/providers/Microsoft.Support/services/quota_service_guid")
{
SupportPlanId = "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=",
QuotaTicketDetails = new QuotaTicketDetails()
{
QuotaChangeRequestSubType = "Subscription",
QuotaChangeRequestVersion = "1.0",
QuotaChangeRequests =
{
new SupportQuotaChangeContent()
{
Region = "EastUS",
Payload = "{\"NewLimit\":200,\"Type\":\"Account\"}",
}
},
},
};
ArmOperation<SubscriptionSupportTicketResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, supportTicketName, data);
SubscriptionSupportTicketResource 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.Consent;
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.SecondaryConsent;
import com.azure.resourcemanager.support.models.SeverityLevel;
import com.azure.resourcemanager.support.models.TechnicalTicketDetails;
import com.azure.resourcemanager.support.models.UserConsent;
import java.util.Arrays;
/**
* Samples for SupportTickets Create.
*/
public final class Main {
/*
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-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).withAdvancedDiagnosticConsent(Consent.YES)
.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")
.withSupportPlanId(
"U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=")
.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/2024-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).withAdvancedDiagnosticConsent(Consent.YES)
.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/2024-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).withAdvancedDiagnosticConsent(Consent.YES)
.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")
.withSupportPlanId(
"U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=")
.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/2024-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).withAdvancedDiagnosticConsent(Consent.YES)
.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")
.withSupportPlanId(
"U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=")
.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/2024-04-01/examples/
* CreateSubMgmtSupportTicketForSubscription.json
*/
/**
* Sample code: Create a ticket for Subscription Management related issues for a subscription.
*
* @param manager Entry point to SupportManager.
*/
public static void createATicketForSubscriptionManagementRelatedIssuesForASubscription(
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).withAdvancedDiagnosticConsent(Consent.NO)
.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")
.withSupportPlanId(
"U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=")
.withFileWorkspaceName("6f16735c-1530836f-e9970f1a-2e49-47b7-96cd-9746b83aa066").create();
}
/*
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/
* CreateTechnicalSupportTicketForSubscription.json
*/
/**
* Sample code: Create a ticket for Technical issue related to a specific resource for a subscription.
*
* @param manager Entry point to SupportManager.
*/
public static void createATicketForTechnicalIssueRelatedToASpecificResourceForASubscription(
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).withAdvancedDiagnosticConsent(Consent.YES)
.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")
.withProblemScopingQuestions(
"{\"articleId\":\"076846c1-4c0b-4b21-91c6-1a30246b3867\",\"scopingDetails\":[{\"question\":\"When did the problem begin?\",\"controlId\":\"problem_start_time\",\"orderId\":1,\"inputType\":\"static\",\"answer\":{\"displayValue\":\"2023-08-31T18:55:00.739Z\",\"value\":\"2023-08-31T18:55:00.739Z\",\"type\":\"datetime\"}},{\"question\":\"API Type of the Cosmos DB account\",\"controlId\":\"api_type\",\"orderId\":2,\"inputType\":\"static\",\"answer\":{\"displayValue\":\"Table\",\"value\":\"tables\",\"type\":\"string\"}},{\"question\":\"Table name\",\"controlId\":\"collection_name_table\",\"orderId\":11,\"inputType\":\"nonstatic\",\"answer\":{\"displayValue\":\"Select Table Name\",\"value\":\"dont_know_answer\",\"type\":\"string\"}},{\"question\":\"Provide additional details about the issue you're facing\",\"controlId\":\"problem_description\",\"orderId\":12,\"inputType\":\"nonstatic\",\"answer\":{\"displayValue\":\"test ticket, please ignore and close\",\"value\":\"test ticket, please ignore and close\",\"type\":\"string\"}}]}")
.withSupportPlanId(
"U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=")
.withFileWorkspaceName("6f16735c-1530836f-e9970f1a-2e49-47b7-96cd-9746b83aa066")
.withTechnicalTicketDetails(new TechnicalTicketDetails().withResourceId(
"/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/resourceGroups/test/providers/Microsoft.Compute/virtualMachines/testserver"))
.withSecondaryConsent(Arrays.asList(
new SecondaryConsent().withUserConsent(UserConsent.YES).withType("virtualmachinerunninglinuxservice")))
.create();
}
/*
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-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).withAdvancedDiagnosticConsent(Consent.YES)
.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")
.withSupportPlanId(
"U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=")
.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/2024-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).withAdvancedDiagnosticConsent(Consent.YES)
.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")
.withSupportPlanId(
"U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=")
.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/2024-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).withAdvancedDiagnosticConsent(Consent.YES)
.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")
.withSupportPlanId(
"U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=")
.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/2024-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).withAdvancedDiagnosticConsent(Consent.NO)
.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")
.withSupportPlanId(
"U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=")
.withFileWorkspaceName("6f16735c-1530836f-e9970f1a-2e49-47b7-96cd-9746b83aa066").create();
}
/*
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-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).withAdvancedDiagnosticConsent(Consent.YES)
.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")
.withSupportPlanId(
"U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=")
.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/2024-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).withAdvancedDiagnosticConsent(Consent.YES)
.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")
.withSupportPlanId(
"U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=")
.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/2024-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).withAdvancedDiagnosticConsent(Consent.YES)
.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")
.withSupportPlanId(
"U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=")
.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/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/operationResults/operationid?api-version=2024-04-01
azure-asyncoperation: https://management.azure.com/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/operationsStatus/operationid?api-version=2024-04-01
{
"id": "/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/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,
"advancedDiagnosticConsent": "Yes",
"supportPlanId": "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=",
"fileWorkspaceName": "testticket",
"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",
"supportPlanDisplayName": "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/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/supportTickets/testticket?api-version=2024-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",
"advancedDiagnosticConsent": "Yes",
"supportPlanId": "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=",
"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 typing import Any, IO, Union
from azure.identity import DefaultAzureCredential
from azure.mgmt.support import MicrosoftSupport
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-support
# USAGE
python create_cores_quota_ticket_for_subscription.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = MicrosoftSupport(
credential=DefaultAzureCredential(),
subscription_id="132d901f-189d-4381-9214-fe68e27e05a1",
)
response = client.support_tickets.begin_create(
support_ticket_name="testticket",
create_support_ticket_parameters={
"properties": {
"advancedDiagnosticConsent": "Yes",
"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",
"supportPlanId": "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=",
"title": "my title",
}
},
).result()
print(response)
# x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-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/106483d9f698ac3b6c0d481ab0c5fab14152e21f/specification/support/resource-manager/Microsoft.Support/stable/2024-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"),
AdvancedDiagnosticConsent: to.Ptr(armsupport.ConsentYes),
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),
SupportPlanID: to.Ptr("U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw="),
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/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/supportTickets/testticket"),
// Properties: &armsupport.TicketDetailsProperties{
// Description: to.Ptr("my description"),
// AdvancedDiagnosticConsent: to.Ptr(armsupport.ConsentYes),
// 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}()),
// FileWorkspaceName: to.Ptr("testticket"),
// 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{
// },
// SupportPlanDisplayName: to.Ptr("Premier"),
// SupportPlanID: to.Ptr("U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw="),
// 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/2024-04-01/examples/CreateCoresQuotaTicketForSubscription.json
*/
async function createATicketToRequestQuotaIncreaseForComputeVMCores() {
const subscriptionId =
process.env["SUPPORT_SUBSCRIPTION_ID"] || "132d901f-189d-4381-9214-fe68e27e05a1";
const supportTicketName = "testticket";
const createSupportTicketParameters = {
description: "my description",
advancedDiagnosticConsent: "Yes",
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",
supportPlanId:
"U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=",
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 Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Resources;
using Azure.ResourceManager.Support.Models;
using Azure.ResourceManager.Support;
// Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/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://video2.skills-academy.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 = "132d901f-189d-4381-9214-fe68e27e05a1";
ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId);
SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
// get the collection of this SubscriptionSupportTicketResource
SubscriptionSupportTicketCollection collection = subscriptionResource.GetSubscriptionSupportTickets();
// invoke the operation
string supportTicketName = "testticket";
SupportTicketData data = new SupportTicketData("my description", "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/cores_problemClassification_guid", SupportSeverityLevel.Moderate, AdvancedDiagnosticConsent.Yes, new SupportContactProfile("abc", "xyz", PreferredContactMethod.Email, "abc@contoso.com", "Pacific Standard Time", "usa", "en-US"), "my title", "/providers/Microsoft.Support/services/quota_service_guid")
{
SupportPlanId = "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=",
QuotaTicketDetails = new QuotaTicketDetails()
{
QuotaChangeRequestVersion = "1.0",
QuotaChangeRequests =
{
new SupportQuotaChangeContent()
{
Region = "EastUS",
Payload = "{\"SKU\":\"DSv3 Series\",\"NewLimit\":104}",
}
},
},
};
ArmOperation<SubscriptionSupportTicketResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, supportTicketName, data);
SubscriptionSupportTicketResource 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/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/operationResults/operationid?api-version=2024-04-01
azure-asyncoperation: https://management.azure.com/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/operationsStatus/operationid?api-version=2024-04-01
{
"id": "/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/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,
"advancedDiagnosticConsent": "Yes",
"supportPlanId": "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=",
"fileWorkspaceName": "testticket",
"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",
"supportPlanDisplayName": "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/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/supportTickets/testticket?api-version=2024-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",
"advancedDiagnosticConsent": "Yes",
"supportPlanId": "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=",
"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 typing import Any, IO, Union
from azure.identity import DefaultAzureCredential
from azure.mgmt.support import MicrosoftSupport
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-support
# USAGE
python create_sql_datawarehouse_quota_ticket_for_dtus.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = MicrosoftSupport(
credential=DefaultAzureCredential(),
subscription_id="132d901f-189d-4381-9214-fe68e27e05a1",
)
response = client.support_tickets.begin_create(
support_ticket_name="testticket",
create_support_ticket_parameters={
"properties": {
"advancedDiagnosticConsent": "Yes",
"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",
"supportPlanId": "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=",
"title": "my title",
}
},
).result()
print(response)
# x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-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/106483d9f698ac3b6c0d481ab0c5fab14152e21f/specification/support/resource-manager/Microsoft.Support/stable/2024-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"),
AdvancedDiagnosticConsent: to.Ptr(armsupport.ConsentYes),
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),
SupportPlanID: to.Ptr("U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw="),
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/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/supportTickets/testticket"),
// Properties: &armsupport.TicketDetailsProperties{
// Description: to.Ptr("my description"),
// AdvancedDiagnosticConsent: to.Ptr(armsupport.ConsentYes),
// 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}()),
// FileWorkspaceName: to.Ptr("testticket"),
// 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{
// },
// SupportPlanDisplayName: to.Ptr("Premier"),
// SupportPlanID: to.Ptr("U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw="),
// 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/2024-04-01/examples/CreateSqlDatawarehouseQuotaTicketForDTUs.json
*/
async function createATicketToRequestQuotaIncreaseForDtUsForAzureSynapseAnalytics() {
const subscriptionId =
process.env["SUPPORT_SUBSCRIPTION_ID"] || "132d901f-189d-4381-9214-fe68e27e05a1";
const supportTicketName = "testticket";
const createSupportTicketParameters = {
description: "my description",
advancedDiagnosticConsent: "Yes",
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",
supportPlanId:
"U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=",
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 Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Resources;
using Azure.ResourceManager.Support.Models;
using Azure.ResourceManager.Support;
// Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/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://video2.skills-academy.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 = "132d901f-189d-4381-9214-fe68e27e05a1";
ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId);
SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
// get the collection of this SubscriptionSupportTicketResource
SubscriptionSupportTicketCollection collection = subscriptionResource.GetSubscriptionSupportTickets();
// invoke the operation
string supportTicketName = "testticket";
SupportTicketData data = new SupportTicketData("my description", "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_datawarehouse_problemClassification_guid", SupportSeverityLevel.Moderate, AdvancedDiagnosticConsent.Yes, new SupportContactProfile("abc", "xyz", PreferredContactMethod.Email, "abc@contoso.com", "Pacific Standard Time", "usa", "en-US"), "my title", "/providers/Microsoft.Support/services/quota_service_guid")
{
SupportPlanId = "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=",
QuotaTicketDetails = new QuotaTicketDetails()
{
QuotaChangeRequestSubType = "DTUs",
QuotaChangeRequestVersion = "1.0",
QuotaChangeRequests =
{
new SupportQuotaChangeContent()
{
Region = "EastUS",
Payload = "{\"ServerName\":\"testserver\",\"NewLimit\":54000}",
}
},
},
};
ArmOperation<SubscriptionSupportTicketResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, supportTicketName, data);
SubscriptionSupportTicketResource 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.Consent;
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.SecondaryConsent;
import com.azure.resourcemanager.support.models.SeverityLevel;
import com.azure.resourcemanager.support.models.TechnicalTicketDetails;
import com.azure.resourcemanager.support.models.UserConsent;
import java.util.Arrays;
/**
* Samples for SupportTickets Create.
*/
public final class Main {
/*
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-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).withAdvancedDiagnosticConsent(Consent.YES)
.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")
.withSupportPlanId(
"U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=")
.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/2024-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).withAdvancedDiagnosticConsent(Consent.YES)
.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/2024-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).withAdvancedDiagnosticConsent(Consent.YES)
.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")
.withSupportPlanId(
"U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=")
.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/2024-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).withAdvancedDiagnosticConsent(Consent.YES)
.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")
.withSupportPlanId(
"U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=")
.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/2024-04-01/examples/
* CreateSubMgmtSupportTicketForSubscription.json
*/
/**
* Sample code: Create a ticket for Subscription Management related issues for a subscription.
*
* @param manager Entry point to SupportManager.
*/
public static void createATicketForSubscriptionManagementRelatedIssuesForASubscription(
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).withAdvancedDiagnosticConsent(Consent.NO)
.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")
.withSupportPlanId(
"U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=")
.withFileWorkspaceName("6f16735c-1530836f-e9970f1a-2e49-47b7-96cd-9746b83aa066").create();
}
/*
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/
* CreateTechnicalSupportTicketForSubscription.json
*/
/**
* Sample code: Create a ticket for Technical issue related to a specific resource for a subscription.
*
* @param manager Entry point to SupportManager.
*/
public static void createATicketForTechnicalIssueRelatedToASpecificResourceForASubscription(
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).withAdvancedDiagnosticConsent(Consent.YES)
.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")
.withProblemScopingQuestions(
"{\"articleId\":\"076846c1-4c0b-4b21-91c6-1a30246b3867\",\"scopingDetails\":[{\"question\":\"When did the problem begin?\",\"controlId\":\"problem_start_time\",\"orderId\":1,\"inputType\":\"static\",\"answer\":{\"displayValue\":\"2023-08-31T18:55:00.739Z\",\"value\":\"2023-08-31T18:55:00.739Z\",\"type\":\"datetime\"}},{\"question\":\"API Type of the Cosmos DB account\",\"controlId\":\"api_type\",\"orderId\":2,\"inputType\":\"static\",\"answer\":{\"displayValue\":\"Table\",\"value\":\"tables\",\"type\":\"string\"}},{\"question\":\"Table name\",\"controlId\":\"collection_name_table\",\"orderId\":11,\"inputType\":\"nonstatic\",\"answer\":{\"displayValue\":\"Select Table Name\",\"value\":\"dont_know_answer\",\"type\":\"string\"}},{\"question\":\"Provide additional details about the issue you're facing\",\"controlId\":\"problem_description\",\"orderId\":12,\"inputType\":\"nonstatic\",\"answer\":{\"displayValue\":\"test ticket, please ignore and close\",\"value\":\"test ticket, please ignore and close\",\"type\":\"string\"}}]}")
.withSupportPlanId(
"U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=")
.withFileWorkspaceName("6f16735c-1530836f-e9970f1a-2e49-47b7-96cd-9746b83aa066")
.withTechnicalTicketDetails(new TechnicalTicketDetails().withResourceId(
"/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/resourceGroups/test/providers/Microsoft.Compute/virtualMachines/testserver"))
.withSecondaryConsent(Arrays.asList(
new SecondaryConsent().withUserConsent(UserConsent.YES).withType("virtualmachinerunninglinuxservice")))
.create();
}
/*
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-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).withAdvancedDiagnosticConsent(Consent.YES)
.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")
.withSupportPlanId(
"U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=")
.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/2024-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).withAdvancedDiagnosticConsent(Consent.YES)
.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")
.withSupportPlanId(
"U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=")
.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/2024-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).withAdvancedDiagnosticConsent(Consent.YES)
.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")
.withSupportPlanId(
"U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=")
.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/2024-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).withAdvancedDiagnosticConsent(Consent.NO)
.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")
.withSupportPlanId(
"U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=")
.withFileWorkspaceName("6f16735c-1530836f-e9970f1a-2e49-47b7-96cd-9746b83aa066").create();
}
/*
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-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).withAdvancedDiagnosticConsent(Consent.YES)
.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")
.withSupportPlanId(
"U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=")
.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/2024-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).withAdvancedDiagnosticConsent(Consent.YES)
.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")
.withSupportPlanId(
"U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=")
.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/2024-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).withAdvancedDiagnosticConsent(Consent.YES)
.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")
.withSupportPlanId(
"U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=")
.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/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/operationResults/operationid?api-version=2024-04-01
azure-asyncoperation: https://management.azure.com/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/operationsStatus/operationid?api-version=2024-04-01
{
"id": "/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/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,
"advancedDiagnosticConsent": "Yes",
"supportPlanId": "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=",
"fileWorkspaceName": "testticket",
"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",
"supportPlanDisplayName": "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/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/supportTickets/testticket?api-version=2024-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",
"advancedDiagnosticConsent": "Yes",
"supportPlanId": "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=",
"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 typing import Any, IO, Union
from azure.identity import DefaultAzureCredential
from azure.mgmt.support import MicrosoftSupport
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-support
# USAGE
python create_sql_database_quota_ticket_for_dtus.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = MicrosoftSupport(
credential=DefaultAzureCredential(),
subscription_id="132d901f-189d-4381-9214-fe68e27e05a1",
)
response = client.support_tickets.begin_create(
support_ticket_name="testticket",
create_support_ticket_parameters={
"properties": {
"advancedDiagnosticConsent": "Yes",
"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",
"supportPlanId": "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=",
"title": "my title",
}
},
).result()
print(response)
# x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-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/106483d9f698ac3b6c0d481ab0c5fab14152e21f/specification/support/resource-manager/Microsoft.Support/stable/2024-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"),
AdvancedDiagnosticConsent: to.Ptr(armsupport.ConsentYes),
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),
SupportPlanID: to.Ptr("U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw="),
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/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/supportTickets/testticket"),
// Properties: &armsupport.TicketDetailsProperties{
// Description: to.Ptr("my description"),
// AdvancedDiagnosticConsent: to.Ptr(armsupport.ConsentYes),
// 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}()),
// FileWorkspaceName: to.Ptr("testticket"),
// 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{
// },
// SupportPlanDisplayName: to.Ptr("Premier"),
// SupportPlanID: to.Ptr("U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw="),
// 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/2024-04-01/examples/CreateSqlDatabaseQuotaTicketForDTUs.json
*/
async function createATicketToRequestQuotaIncreaseForDtUsForSqlDatabase() {
const subscriptionId =
process.env["SUPPORT_SUBSCRIPTION_ID"] || "132d901f-189d-4381-9214-fe68e27e05a1";
const supportTicketName = "testticket";
const createSupportTicketParameters = {
description: "my description",
advancedDiagnosticConsent: "Yes",
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",
supportPlanId:
"U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=",
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 Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Resources;
using Azure.ResourceManager.Support.Models;
using Azure.ResourceManager.Support;
// Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/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://video2.skills-academy.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 = "132d901f-189d-4381-9214-fe68e27e05a1";
ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId);
SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
// get the collection of this SubscriptionSupportTicketResource
SubscriptionSupportTicketCollection collection = subscriptionResource.GetSubscriptionSupportTickets();
// invoke the operation
string supportTicketName = "testticket";
SupportTicketData data = new SupportTicketData("my description", "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_database_problemClassification_guid", SupportSeverityLevel.Moderate, AdvancedDiagnosticConsent.Yes, new SupportContactProfile("abc", "xyz", PreferredContactMethod.Email, "abc@contoso.com", "Pacific Standard Time", "usa", "en-US"), "my title", "/providers/Microsoft.Support/services/quota_service_guid")
{
SupportPlanId = "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=",
QuotaTicketDetails = new QuotaTicketDetails()
{
QuotaChangeRequestSubType = "DTUs",
QuotaChangeRequestVersion = "1.0",
QuotaChangeRequests =
{
new SupportQuotaChangeContent()
{
Region = "EastUS",
Payload = "{\"ServerName\":\"testserver\",\"NewLimit\":54000}",
}
},
},
};
ArmOperation<SubscriptionSupportTicketResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, supportTicketName, data);
SubscriptionSupportTicketResource 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.Consent;
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.SecondaryConsent;
import com.azure.resourcemanager.support.models.SeverityLevel;
import com.azure.resourcemanager.support.models.TechnicalTicketDetails;
import com.azure.resourcemanager.support.models.UserConsent;
import java.util.Arrays;
/**
* Samples for SupportTickets Create.
*/
public final class Main {
/*
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-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).withAdvancedDiagnosticConsent(Consent.YES)
.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")
.withSupportPlanId(
"U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=")
.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/2024-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).withAdvancedDiagnosticConsent(Consent.YES)
.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/2024-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).withAdvancedDiagnosticConsent(Consent.YES)
.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")
.withSupportPlanId(
"U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=")
.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/2024-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).withAdvancedDiagnosticConsent(Consent.YES)
.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")
.withSupportPlanId(
"U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=")
.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/2024-04-01/examples/
* CreateSubMgmtSupportTicketForSubscription.json
*/
/**
* Sample code: Create a ticket for Subscription Management related issues for a subscription.
*
* @param manager Entry point to SupportManager.
*/
public static void createATicketForSubscriptionManagementRelatedIssuesForASubscription(
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).withAdvancedDiagnosticConsent(Consent.NO)
.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")
.withSupportPlanId(
"U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=")
.withFileWorkspaceName("6f16735c-1530836f-e9970f1a-2e49-47b7-96cd-9746b83aa066").create();
}
/*
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/
* CreateTechnicalSupportTicketForSubscription.json
*/
/**
* Sample code: Create a ticket for Technical issue related to a specific resource for a subscription.
*
* @param manager Entry point to SupportManager.
*/
public static void createATicketForTechnicalIssueRelatedToASpecificResourceForASubscription(
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).withAdvancedDiagnosticConsent(Consent.YES)
.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")
.withProblemScopingQuestions(
"{\"articleId\":\"076846c1-4c0b-4b21-91c6-1a30246b3867\",\"scopingDetails\":[{\"question\":\"When did the problem begin?\",\"controlId\":\"problem_start_time\",\"orderId\":1,\"inputType\":\"static\",\"answer\":{\"displayValue\":\"2023-08-31T18:55:00.739Z\",\"value\":\"2023-08-31T18:55:00.739Z\",\"type\":\"datetime\"}},{\"question\":\"API Type of the Cosmos DB account\",\"controlId\":\"api_type\",\"orderId\":2,\"inputType\":\"static\",\"answer\":{\"displayValue\":\"Table\",\"value\":\"tables\",\"type\":\"string\"}},{\"question\":\"Table name\",\"controlId\":\"collection_name_table\",\"orderId\":11,\"inputType\":\"nonstatic\",\"answer\":{\"displayValue\":\"Select Table Name\",\"value\":\"dont_know_answer\",\"type\":\"string\"}},{\"question\":\"Provide additional details about the issue you're facing\",\"controlId\":\"problem_description\",\"orderId\":12,\"inputType\":\"nonstatic\",\"answer\":{\"displayValue\":\"test ticket, please ignore and close\",\"value\":\"test ticket, please ignore and close\",\"type\":\"string\"}}]}")
.withSupportPlanId(
"U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=")
.withFileWorkspaceName("6f16735c-1530836f-e9970f1a-2e49-47b7-96cd-9746b83aa066")
.withTechnicalTicketDetails(new TechnicalTicketDetails().withResourceId(
"/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/resourceGroups/test/providers/Microsoft.Compute/virtualMachines/testserver"))
.withSecondaryConsent(Arrays.asList(
new SecondaryConsent().withUserConsent(UserConsent.YES).withType("virtualmachinerunninglinuxservice")))
.create();
}
/*
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-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).withAdvancedDiagnosticConsent(Consent.YES)
.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")
.withSupportPlanId(
"U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=")
.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/2024-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).withAdvancedDiagnosticConsent(Consent.YES)
.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")
.withSupportPlanId(
"U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=")
.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/2024-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).withAdvancedDiagnosticConsent(Consent.YES)
.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")
.withSupportPlanId(
"U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=")
.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/2024-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).withAdvancedDiagnosticConsent(Consent.NO)
.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")
.withSupportPlanId(
"U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=")
.withFileWorkspaceName("6f16735c-1530836f-e9970f1a-2e49-47b7-96cd-9746b83aa066").create();
}
/*
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-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).withAdvancedDiagnosticConsent(Consent.YES)
.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")
.withSupportPlanId(
"U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=")
.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/2024-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).withAdvancedDiagnosticConsent(Consent.YES)
.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")
.withSupportPlanId(
"U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=")
.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/2024-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).withAdvancedDiagnosticConsent(Consent.YES)
.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")
.withSupportPlanId(
"U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=")
.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/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/operationResults/operationid?api-version=2024-04-01
azure-asyncoperation: https://management.azure.com/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/operationsStatus/operationid?api-version=2024-04-01
{
"id": "/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/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,
"advancedDiagnosticConsent": "Yes",
"supportPlanId": "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=",
"fileWorkspaceName": "testticket",
"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",
"supportPlanDisplayName": "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/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/supportTickets/testticket?api-version=2024-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",
"advancedDiagnosticConsent": "Yes",
"supportPlanId": "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=",
"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 typing import Any, IO, Union
from azure.identity import DefaultAzureCredential
from azure.mgmt.support import MicrosoftSupport
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-support
# USAGE
python create_batch_quota_ticket_for_specific_batch_account_for_low_priority_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="132d901f-189d-4381-9214-fe68e27e05a1",
)
response = client.support_tickets.begin_create(
support_ticket_name="testticket",
create_support_ticket_parameters={
"properties": {
"advancedDiagnosticConsent": "Yes",
"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",
"supportPlanId": "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=",
"title": "my title",
}
},
).result()
print(response)
# x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-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/106483d9f698ac3b6c0d481ab0c5fab14152e21f/specification/support/resource-manager/Microsoft.Support/stable/2024-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"),
AdvancedDiagnosticConsent: to.Ptr(armsupport.ConsentYes),
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),
SupportPlanID: to.Ptr("U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw="),
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/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/supportTickets/testticket"),
// Properties: &armsupport.TicketDetailsProperties{
// Description: to.Ptr("my description"),
// AdvancedDiagnosticConsent: to.Ptr(armsupport.ConsentYes),
// 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}()),
// FileWorkspaceName: to.Ptr("testticket"),
// 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{
// },
// SupportPlanDisplayName: to.Ptr("Premier"),
// SupportPlanID: to.Ptr("U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw="),
// 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/2024-04-01/examples/CreateBatchQuotaTicketForSpecificBatchAccountForLowPriorityCores.json
*/
async function createATicketToRequestQuotaIncreaseForLowPriorityCoresForABatchAccount() {
const subscriptionId =
process.env["SUPPORT_SUBSCRIPTION_ID"] || "132d901f-189d-4381-9214-fe68e27e05a1";
const supportTicketName = "testticket";
const createSupportTicketParameters = {
description: "my description",
advancedDiagnosticConsent: "Yes",
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",
supportPlanId:
"U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=",
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 Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Resources;
using Azure.ResourceManager.Support.Models;
using Azure.ResourceManager.Support;
// Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/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://video2.skills-academy.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 = "132d901f-189d-4381-9214-fe68e27e05a1";
ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId);
SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
// get the collection of this SubscriptionSupportTicketResource
SubscriptionSupportTicketCollection collection = subscriptionResource.GetSubscriptionSupportTickets();
// invoke the operation
string supportTicketName = "testticket";
SupportTicketData data = new SupportTicketData("my description", "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid", SupportSeverityLevel.Moderate, AdvancedDiagnosticConsent.Yes, new SupportContactProfile("abc", "xyz", PreferredContactMethod.Email, "abc@contoso.com", "Pacific Standard Time", "usa", "en-US"), "my title", "/providers/Microsoft.Support/services/quota_service_guid")
{
SupportPlanId = "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=",
QuotaTicketDetails = new QuotaTicketDetails()
{
QuotaChangeRequestSubType = "Account",
QuotaChangeRequestVersion = "1.0",
QuotaChangeRequests =
{
new SupportQuotaChangeContent()
{
Region = "EastUS",
Payload = "{\"AccountName\":\"test\",\"NewLimit\":200,\"Type\":\"LowPriority\"}",
}
},
},
};
ArmOperation<SubscriptionSupportTicketResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, supportTicketName, data);
SubscriptionSupportTicketResource 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/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/operationResults/operationid?api-version=2024-04-01
azure-asyncoperation: https://management.azure.com/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/operationsStatus/operationid?api-version=2024-04-01
{
"id": "/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/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,
"advancedDiagnosticConsent": "Yes",
"supportPlanId": "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=",
"fileWorkspaceName": "testticket",
"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",
"supportPlanDisplayName": "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/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/supportTickets/testticket?api-version=2024-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",
"advancedDiagnosticConsent": "Yes",
"supportPlanId": "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=",
"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 typing import Any, IO, Union
from azure.identity import DefaultAzureCredential
from azure.mgmt.support import MicrosoftSupport
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-support
# USAGE
python create_machine_learning_quota_ticket_for_low_priority_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="132d901f-189d-4381-9214-fe68e27e05a1",
)
response = client.support_tickets.begin_create(
support_ticket_name="testticket",
create_support_ticket_parameters={
"properties": {
"advancedDiagnosticConsent": "Yes",
"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",
"supportPlanId": "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=",
"title": "my title",
}
},
).result()
print(response)
# x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-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/106483d9f698ac3b6c0d481ab0c5fab14152e21f/specification/support/resource-manager/Microsoft.Support/stable/2024-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"),
AdvancedDiagnosticConsent: to.Ptr(armsupport.ConsentYes),
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),
SupportPlanID: to.Ptr("U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw="),
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/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/supportTickets/testticket"),
// Properties: &armsupport.TicketDetailsProperties{
// Description: to.Ptr("my description"),
// AdvancedDiagnosticConsent: to.Ptr(armsupport.ConsentYes),
// 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}()),
// FileWorkspaceName: to.Ptr("testticket"),
// 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{
// },
// SupportPlanDisplayName: to.Ptr("Premier"),
// SupportPlanID: to.Ptr("U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw="),
// 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/2024-04-01/examples/CreateMachineLearningQuotaTicketForLowPriorityCores.json
*/
async function createATicketToRequestQuotaIncreaseForLowPriorityCoresForMachineLearningService() {
const subscriptionId =
process.env["SUPPORT_SUBSCRIPTION_ID"] || "132d901f-189d-4381-9214-fe68e27e05a1";
const supportTicketName = "testticket";
const createSupportTicketParameters = {
description: "my description",
advancedDiagnosticConsent: "Yes",
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",
supportPlanId:
"U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=",
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 Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Resources;
using Azure.ResourceManager.Support.Models;
using Azure.ResourceManager.Support;
// Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/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://video2.skills-academy.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 = "132d901f-189d-4381-9214-fe68e27e05a1";
ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId);
SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
// get the collection of this SubscriptionSupportTicketResource
SubscriptionSupportTicketCollection collection = subscriptionResource.GetSubscriptionSupportTickets();
// invoke the operation
string supportTicketName = "testticket";
SupportTicketData data = new SupportTicketData("my description", "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/machine_learning_service_problemClassification_guid", SupportSeverityLevel.Moderate, AdvancedDiagnosticConsent.Yes, new SupportContactProfile("abc", "xyz", PreferredContactMethod.Email, "abc@contoso.com", "Pacific Standard Time", "usa", "en-US"), "my title", "/providers/Microsoft.Support/services/quota_service_guid")
{
SupportPlanId = "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=",
QuotaTicketDetails = new QuotaTicketDetails()
{
QuotaChangeRequestSubType = "BatchAml",
QuotaChangeRequestVersion = "1.0",
QuotaChangeRequests =
{
new SupportQuotaChangeContent()
{
Region = "EastUS",
Payload = "{\"NewLimit\":200,\"Type\":\"LowPriority\"}",
}
},
},
};
ArmOperation<SubscriptionSupportTicketResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, supportTicketName, data);
SubscriptionSupportTicketResource 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.Consent;
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.SecondaryConsent;
import com.azure.resourcemanager.support.models.SeverityLevel;
import com.azure.resourcemanager.support.models.TechnicalTicketDetails;
import com.azure.resourcemanager.support.models.UserConsent;
import java.util.Arrays;
/**
* Samples for SupportTickets Create.
*/
public final class Main {
/*
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-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).withAdvancedDiagnosticConsent(Consent.YES)
.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")
.withSupportPlanId(
"U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=")
.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/2024-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).withAdvancedDiagnosticConsent(Consent.YES)
.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/2024-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).withAdvancedDiagnosticConsent(Consent.YES)
.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")
.withSupportPlanId(
"U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=")
.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/2024-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).withAdvancedDiagnosticConsent(Consent.YES)
.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")
.withSupportPlanId(
"U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=")
.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/2024-04-01/examples/
* CreateSubMgmtSupportTicketForSubscription.json
*/
/**
* Sample code: Create a ticket for Subscription Management related issues for a subscription.
*
* @param manager Entry point to SupportManager.
*/
public static void createATicketForSubscriptionManagementRelatedIssuesForASubscription(
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).withAdvancedDiagnosticConsent(Consent.NO)
.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")
.withSupportPlanId(
"U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=")
.withFileWorkspaceName("6f16735c-1530836f-e9970f1a-2e49-47b7-96cd-9746b83aa066").create();
}
/*
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/
* CreateTechnicalSupportTicketForSubscription.json
*/
/**
* Sample code: Create a ticket for Technical issue related to a specific resource for a subscription.
*
* @param manager Entry point to SupportManager.
*/
public static void createATicketForTechnicalIssueRelatedToASpecificResourceForASubscription(
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).withAdvancedDiagnosticConsent(Consent.YES)
.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")
.withProblemScopingQuestions(
"{\"articleId\":\"076846c1-4c0b-4b21-91c6-1a30246b3867\",\"scopingDetails\":[{\"question\":\"When did the problem begin?\",\"controlId\":\"problem_start_time\",\"orderId\":1,\"inputType\":\"static\",\"answer\":{\"displayValue\":\"2023-08-31T18:55:00.739Z\",\"value\":\"2023-08-31T18:55:00.739Z\",\"type\":\"datetime\"}},{\"question\":\"API Type of the Cosmos DB account\",\"controlId\":\"api_type\",\"orderId\":2,\"inputType\":\"static\",\"answer\":{\"displayValue\":\"Table\",\"value\":\"tables\",\"type\":\"string\"}},{\"question\":\"Table name\",\"controlId\":\"collection_name_table\",\"orderId\":11,\"inputType\":\"nonstatic\",\"answer\":{\"displayValue\":\"Select Table Name\",\"value\":\"dont_know_answer\",\"type\":\"string\"}},{\"question\":\"Provide additional details about the issue you're facing\",\"controlId\":\"problem_description\",\"orderId\":12,\"inputType\":\"nonstatic\",\"answer\":{\"displayValue\":\"test ticket, please ignore and close\",\"value\":\"test ticket, please ignore and close\",\"type\":\"string\"}}]}")
.withSupportPlanId(
"U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=")
.withFileWorkspaceName("6f16735c-1530836f-e9970f1a-2e49-47b7-96cd-9746b83aa066")
.withTechnicalTicketDetails(new TechnicalTicketDetails().withResourceId(
"/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/resourceGroups/test/providers/Microsoft.Compute/virtualMachines/testserver"))
.withSecondaryConsent(Arrays.asList(
new SecondaryConsent().withUserConsent(UserConsent.YES).withType("virtualmachinerunninglinuxservice")))
.create();
}
/*
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-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).withAdvancedDiagnosticConsent(Consent.YES)
.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")
.withSupportPlanId(
"U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=")
.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/2024-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).withAdvancedDiagnosticConsent(Consent.YES)
.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")
.withSupportPlanId(
"U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=")
.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/2024-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).withAdvancedDiagnosticConsent(Consent.YES)
.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")
.withSupportPlanId(
"U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=")
.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/2024-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).withAdvancedDiagnosticConsent(Consent.NO)
.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")
.withSupportPlanId(
"U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=")
.withFileWorkspaceName("6f16735c-1530836f-e9970f1a-2e49-47b7-96cd-9746b83aa066").create();
}
/*
* x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-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).withAdvancedDiagnosticConsent(Consent.YES)
.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")
.withSupportPlanId(
"U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=")
.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/2024-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).withAdvancedDiagnosticConsent(Consent.YES)
.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")
.withSupportPlanId(
"U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=")
.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/2024-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).withAdvancedDiagnosticConsent(Consent.YES)
.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")
.withSupportPlanId(
"U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=")
.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/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/operationResults/operationid?api-version=2024-04-01
azure-asyncoperation: https://management.azure.com/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/operationsStatus/operationid?api-version=2024-04-01
{
"id": "/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/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,
"advancedDiagnosticConsent": "Yes",
"supportPlanId": "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=",
"fileWorkspaceName": "testticket",
"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",
"supportPlanDisplayName": "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/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/supportTickets/testticket?api-version=2024-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",
"advancedDiagnosticConsent": "Yes",
"supportPlanId": "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=",
"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 typing import Any, IO, Union
from azure.identity import DefaultAzureCredential
from azure.mgmt.support import MicrosoftSupport
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-support
# USAGE
python create_batch_quota_ticket_for_specific_batch_account_for_pools.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = MicrosoftSupport(
credential=DefaultAzureCredential(),
subscription_id="132d901f-189d-4381-9214-fe68e27e05a1",
)
response = client.support_tickets.begin_create(
support_ticket_name="testticket",
create_support_ticket_parameters={
"properties": {
"advancedDiagnosticConsent": "Yes",
"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",
"supportPlanId": "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=",
"title": "my title",
}
},
).result()
print(response)
# x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-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/106483d9f698ac3b6c0d481ab0c5fab14152e21f/specification/support/resource-manager/Microsoft.Support/stable/2024-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"),
AdvancedDiagnosticConsent: to.Ptr(armsupport.ConsentYes),
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),
SupportPlanID: to.Ptr("U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw="),
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/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/supportTickets/testticket"),
// Properties: &armsupport.TicketDetailsProperties{
// Description: to.Ptr("my description"),
// AdvancedDiagnosticConsent: to.Ptr(armsupport.ConsentYes),
// 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}()),
// FileWorkspaceName: to.Ptr("testticket"),
// 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{
// },
// SupportPlanDisplayName: to.Ptr("Premier"),
// SupportPlanID: to.Ptr("U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw="),
// 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/2024-04-01/examples/CreateBatchQuotaTicketForSpecificBatchAccountForPools.json
*/
async function createATicketToRequestQuotaIncreaseForPoolsForABatchAccount() {
const subscriptionId =
process.env["SUPPORT_SUBSCRIPTION_ID"] || "132d901f-189d-4381-9214-fe68e27e05a1";
const supportTicketName = "testticket";
const createSupportTicketParameters = {
description: "my description",
advancedDiagnosticConsent: "Yes",
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",
supportPlanId:
"U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=",
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 Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Resources;
using Azure.ResourceManager.Support.Models;
using Azure.ResourceManager.Support;
// Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/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://video2.skills-academy.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 = "132d901f-189d-4381-9214-fe68e27e05a1";
ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId);
SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
// get the collection of this SubscriptionSupportTicketResource
SubscriptionSupportTicketCollection collection = subscriptionResource.GetSubscriptionSupportTickets();
// invoke the operation
string supportTicketName = "testticket";
SupportTicketData data = new SupportTicketData("my description", "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid", SupportSeverityLevel.Moderate, AdvancedDiagnosticConsent.Yes, new SupportContactProfile("abc", "xyz", PreferredContactMethod.Email, "abc@contoso.com", "Pacific Standard Time", "usa", "en-US"), "my title", "/providers/Microsoft.Support/services/quota_service_guid")
{
SupportPlanId = "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=",
QuotaTicketDetails = new QuotaTicketDetails()
{
QuotaChangeRequestSubType = "Account",
QuotaChangeRequestVersion = "1.0",
QuotaChangeRequests =
{
new SupportQuotaChangeContent()
{
Region = "EastUS",
Payload = "{\"AccountName\":\"test\",\"NewLimit\":200,\"Type\":\"Pools\"}",
}
},
},
};
ArmOperation<SubscriptionSupportTicketResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, supportTicketName, data);
SubscriptionSupportTicketResource 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/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/operationResults/operationid?api-version=2024-04-01
azure-asyncoperation: https://management.azure.com/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/operationsStatus/operationid?api-version=2024-04-01
{
"id": "/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/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,
"advancedDiagnosticConsent": "Yes",
"supportPlanId": "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=",
"fileWorkspaceName": "testticket",
"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",
"supportPlanDisplayName": "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/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/supportTickets/testticket?api-version=2024-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",
"advancedDiagnosticConsent": "Yes",
"supportPlanId": "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=",
"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 typing import Any, IO, Union
from azure.identity import DefaultAzureCredential
from azure.mgmt.support import MicrosoftSupport
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-support
# USAGE
python create_sql_datawarehouse_quota_ticket_for_servers.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = MicrosoftSupport(
credential=DefaultAzureCredential(),
subscription_id="132d901f-189d-4381-9214-fe68e27e05a1",
)
response = client.support_tickets.begin_create(
support_ticket_name="testticket",
create_support_ticket_parameters={
"properties": {
"advancedDiagnosticConsent": "Yes",
"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",
"supportPlanId": "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=",
"title": "my title",
}
},
).result()
print(response)
# x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-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/106483d9f698ac3b6c0d481ab0c5fab14152e21f/specification/support/resource-manager/Microsoft.Support/stable/2024-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"),
AdvancedDiagnosticConsent: to.Ptr(armsupport.ConsentYes),
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),
SupportPlanID: to.Ptr("U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw="),
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/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/supportTickets/testticket"),
// Properties: &armsupport.TicketDetailsProperties{
// Description: to.Ptr("my description"),
// AdvancedDiagnosticConsent: to.Ptr(armsupport.ConsentYes),
// 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}()),
// FileWorkspaceName: to.Ptr("testticket"),
// 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{
// },
// SupportPlanDisplayName: to.Ptr("Premier"),
// SupportPlanID: to.Ptr("U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw="),
// 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/2024-04-01/examples/CreateSqlDatawarehouseQuotaTicketForServers.json
*/
async function createATicketToRequestQuotaIncreaseForServersForAzureSynapseAnalytics() {
const subscriptionId =
process.env["SUPPORT_SUBSCRIPTION_ID"] || "132d901f-189d-4381-9214-fe68e27e05a1";
const supportTicketName = "testticket";
const createSupportTicketParameters = {
description: "my description",
advancedDiagnosticConsent: "Yes",
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",
supportPlanId:
"U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=",
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 Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Resources;
using Azure.ResourceManager.Support.Models;
using Azure.ResourceManager.Support;
// Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/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://video2.skills-academy.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 = "132d901f-189d-4381-9214-fe68e27e05a1";
ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId);
SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
// get the collection of this SubscriptionSupportTicketResource
SubscriptionSupportTicketCollection collection = subscriptionResource.GetSubscriptionSupportTickets();
// invoke the operation
string supportTicketName = "testticket";
SupportTicketData data = new SupportTicketData("my description", "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_datawarehouse_problemClassification_guid", SupportSeverityLevel.Moderate, AdvancedDiagnosticConsent.Yes, new SupportContactProfile("abc", "xyz", PreferredContactMethod.Email, "abc@contoso.com", "Pacific Standard Time", "usa", "en-US"), "my title", "/providers/Microsoft.Support/services/quota_service_guid")
{
SupportPlanId = "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=",
QuotaTicketDetails = new QuotaTicketDetails()
{
QuotaChangeRequestSubType = "Servers",
QuotaChangeRequestVersion = "1.0",
QuotaChangeRequests =
{
new SupportQuotaChangeContent()
{
Region = "EastUS",
Payload = "{\"NewLimit\":200}",
}
},
},
};
ArmOperation<SubscriptionSupportTicketResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, supportTicketName, data);
SubscriptionSupportTicketResource 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/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/operationResults/operationid?api-version=2024-04-01
azure-asyncoperation: https://management.azure.com/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/operationsStatus/operationid?api-version=2024-04-01
{
"id": "/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/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,
"advancedDiagnosticConsent": "Yes",
"supportPlanId": "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=",
"fileWorkspaceName": "testticket",
"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",
"supportPlanDisplayName": "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/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/supportTickets/testticket?api-version=2024-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",
"advancedDiagnosticConsent": "Yes",
"supportPlanId": "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=",
"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 typing import Any, IO, Union
from azure.identity import DefaultAzureCredential
from azure.mgmt.support import MicrosoftSupport
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-support
# USAGE
python create_sql_database_quota_ticket_for_servers.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = MicrosoftSupport(
credential=DefaultAzureCredential(),
subscription_id="132d901f-189d-4381-9214-fe68e27e05a1",
)
response = client.support_tickets.begin_create(
support_ticket_name="testticket",
create_support_ticket_parameters={
"properties": {
"advancedDiagnosticConsent": "Yes",
"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",
"supportPlanId": "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=",
"title": "my title",
}
},
).result()
print(response)
# x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-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/106483d9f698ac3b6c0d481ab0c5fab14152e21f/specification/support/resource-manager/Microsoft.Support/stable/2024-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"),
AdvancedDiagnosticConsent: to.Ptr(armsupport.ConsentYes),
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),
SupportPlanID: to.Ptr("U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw="),
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/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/supportTickets/testticket"),
// Properties: &armsupport.TicketDetailsProperties{
// Description: to.Ptr("my description"),
// AdvancedDiagnosticConsent: to.Ptr(armsupport.ConsentYes),
// 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}()),
// FileWorkspaceName: to.Ptr("testticket"),
// 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{
// },
// SupportPlanDisplayName: to.Ptr("Premier"),
// SupportPlanID: to.Ptr("U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw="),
// 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/2024-04-01/examples/CreateSqlDatabaseQuotaTicketForServers.json
*/
async function createATicketToRequestQuotaIncreaseForServersForSqlDatabase() {
const subscriptionId =
process.env["SUPPORT_SUBSCRIPTION_ID"] || "132d901f-189d-4381-9214-fe68e27e05a1";
const supportTicketName = "testticket";
const createSupportTicketParameters = {
description: "my description",
advancedDiagnosticConsent: "Yes",
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",
supportPlanId:
"U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=",
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 Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Resources;
using Azure.ResourceManager.Support.Models;
using Azure.ResourceManager.Support;
// Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/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://video2.skills-academy.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 = "132d901f-189d-4381-9214-fe68e27e05a1";
ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId);
SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
// get the collection of this SubscriptionSupportTicketResource
SubscriptionSupportTicketCollection collection = subscriptionResource.GetSubscriptionSupportTickets();
// invoke the operation
string supportTicketName = "testticket";
SupportTicketData data = new SupportTicketData("my description", "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_database_problemClassification_guid", SupportSeverityLevel.Moderate, AdvancedDiagnosticConsent.Yes, new SupportContactProfile("abc", "xyz", PreferredContactMethod.Email, "abc@contoso.com", "Pacific Standard Time", "usa", "en-US"), "my title", "/providers/Microsoft.Support/services/quota_service_guid")
{
SupportPlanId = "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=",
QuotaTicketDetails = new QuotaTicketDetails()
{
QuotaChangeRequestSubType = "Servers",
QuotaChangeRequestVersion = "1.0",
QuotaChangeRequests =
{
new SupportQuotaChangeContent()
{
Region = "EastUS",
Payload = "{\"NewLimit\":200}",
}
},
},
};
ArmOperation<SubscriptionSupportTicketResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, supportTicketName, data);
SubscriptionSupportTicketResource 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/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/operationResults/operationid?api-version=2024-04-01
azure-asyncoperation: https://management.azure.com/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/operationsStatus/operationid?api-version=2024-04-01
{
"id": "/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/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,
"advancedDiagnosticConsent": "Yes",
"supportPlanId": "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=",
"fileWorkspaceName": "testticket",
"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",
"supportPlanDisplayName": "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/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/supportTickets/testticket?api-version=2024-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",
"advancedDiagnosticConsent": "Yes",
"contactDetails": {
"firstName": "abc",
"lastName": "xyz",
"primaryEmailAddress": "abc@contoso.com",
"preferredContactMethod": "email",
"preferredTimeZone": "Pacific Standard Time",
"preferredSupportLanguage": "en-US",
"country": "usa"
}
}
}
from typing import Any, IO, Union
from azure.identity import DefaultAzureCredential
from azure.mgmt.support import MicrosoftSupport
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-support
# USAGE
python create_generic_quota_ticket.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = MicrosoftSupport(
credential=DefaultAzureCredential(),
subscription_id="132d901f-189d-4381-9214-fe68e27e05a1",
)
response = client.support_tickets.begin_create(
support_ticket_name="testticket",
create_support_ticket_parameters={
"properties": {
"advancedDiagnosticConsent": "Yes",
"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/2024-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/106483d9f698ac3b6c0d481ab0c5fab14152e21f/specification/support/resource-manager/Microsoft.Support/stable/2024-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"),
AdvancedDiagnosticConsent: to.Ptr(armsupport.ConsentYes),
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/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/supportTickets/testticket"),
// Properties: &armsupport.TicketDetailsProperties{
// Description: to.Ptr("Increase the maximum throughput per container limit to 10000 for account foo bar"),
// AdvancedDiagnosticConsent: to.Ptr(armsupport.ConsentYes),
// 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{
// },
// SupportPlanDisplayName: to.Ptr("Premier"),
// 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/2024-04-01/examples/CreateGenericQuotaTicket.json
*/
async function createATicketToRequestQuotaIncreaseForServicesThatDoNotRequireAdditionalDetailsInTheQuotaTicketDetailsObject() {
const subscriptionId =
process.env["SUPPORT_SUBSCRIPTION_ID"] || "132d901f-189d-4381-9214-fe68e27e05a1";
const supportTicketName = "testticket";
const createSupportTicketParameters = {
description: "Increase the maximum throughput per container limit to 10000 for account foo bar",
advancedDiagnosticConsent: "Yes",
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 Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Resources;
using Azure.ResourceManager.Support.Models;
using Azure.ResourceManager.Support;
// Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/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://video2.skills-academy.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 = "132d901f-189d-4381-9214-fe68e27e05a1";
ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId);
SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
// get the collection of this SubscriptionSupportTicketResource
SubscriptionSupportTicketCollection collection = subscriptionResource.GetSubscriptionSupportTickets();
// invoke the operation
string supportTicketName = "testticket";
SupportTicketData data = new SupportTicketData("Increase the maximum throughput per container limit to 10000 for account foo bar", "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/cosmosdb_problemClassification_guid", SupportSeverityLevel.Moderate, AdvancedDiagnosticConsent.Yes, new SupportContactProfile("abc", "xyz", PreferredContactMethod.Email, "abc@contoso.com", "Pacific Standard Time", "usa", "en-US"), "my title", "/providers/Microsoft.Support/services/quota_service_guid");
ArmOperation<SubscriptionSupportTicketResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, supportTicketName, data);
SubscriptionSupportTicketResource 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/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/operationResults/operationid?api-version=2024-04-01
azure-asyncoperation: https://management.azure.com/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/operationsStatus/operationid?api-version=2024-04-01
{
"id": "/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/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,
"advancedDiagnosticConsent": "Yes",
"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",
"supportPlanDisplayName": "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/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/supportTickets/testticket?api-version=2024-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",
"advancedDiagnosticConsent": "Yes",
"supportPlanId": "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=",
"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 typing import Any, IO, Union
from azure.identity import DefaultAzureCredential
from azure.mgmt.support import MicrosoftSupport
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-support
# USAGE
python create_batch_quota_ticket_for_specific_batch_account_for_dedicated_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="132d901f-189d-4381-9214-fe68e27e05a1",
)
response = client.support_tickets.begin_create(
support_ticket_name="testticket",
create_support_ticket_parameters={
"properties": {
"advancedDiagnosticConsent": "Yes",
"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",
"supportPlanId": "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=",
"title": "my title",
}
},
).result()
print(response)
# x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-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/106483d9f698ac3b6c0d481ab0c5fab14152e21f/specification/support/resource-manager/Microsoft.Support/stable/2024-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"),
AdvancedDiagnosticConsent: to.Ptr(armsupport.ConsentYes),
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),
SupportPlanID: to.Ptr("U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw="),
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/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/supportTickets/testticket"),
// Properties: &armsupport.TicketDetailsProperties{
// Description: to.Ptr("my description"),
// AdvancedDiagnosticConsent: to.Ptr(armsupport.ConsentYes),
// 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}()),
// FileWorkspaceName: to.Ptr("testticket"),
// 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{
// },
// SupportPlanDisplayName: to.Ptr("Premier"),
// SupportPlanID: to.Ptr("U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw="),
// 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/2024-04-01/examples/CreateBatchQuotaTicketForSpecificBatchAccountForDedicatedCores.json
*/
async function createATicketToRequestQuotaIncreaseForSpecificVMFamilyCoresForABatchAccount() {
const subscriptionId =
process.env["SUPPORT_SUBSCRIPTION_ID"] || "132d901f-189d-4381-9214-fe68e27e05a1";
const supportTicketName = "testticket";
const createSupportTicketParameters = {
description: "my description",
advancedDiagnosticConsent: "Yes",
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",
supportPlanId:
"U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=",
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 Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Resources;
using Azure.ResourceManager.Support.Models;
using Azure.ResourceManager.Support;
// Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/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://video2.skills-academy.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 = "132d901f-189d-4381-9214-fe68e27e05a1";
ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId);
SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
// get the collection of this SubscriptionSupportTicketResource
SubscriptionSupportTicketCollection collection = subscriptionResource.GetSubscriptionSupportTickets();
// invoke the operation
string supportTicketName = "testticket";
SupportTicketData data = new SupportTicketData("my description", "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid", SupportSeverityLevel.Moderate, AdvancedDiagnosticConsent.Yes, new SupportContactProfile("abc", "xyz", PreferredContactMethod.Email, "abc@contoso.com", "Pacific Standard Time", "usa", "en-US"), "my title", "/providers/Microsoft.Support/services/quota_service_guid")
{
SupportPlanId = "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=",
QuotaTicketDetails = new QuotaTicketDetails()
{
QuotaChangeRequestSubType = "Account",
QuotaChangeRequestVersion = "1.0",
QuotaChangeRequests =
{
new SupportQuotaChangeContent()
{
Region = "EastUS",
Payload = "{\"AccountName\":\"test\",\"VMFamily\":\"standardA0_A7Family\",\"NewLimit\":200,\"Type\":\"Dedicated\"}",
}
},
},
};
ArmOperation<SubscriptionSupportTicketResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, supportTicketName, data);
SubscriptionSupportTicketResource 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/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/operationResults/operationid?api-version=2024-04-01
azure-asyncoperation: https://management.azure.com/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/operationsStatus/operationid?api-version=2024-04-01
{
"id": "/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/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,
"advancedDiagnosticConsent": "Yes",
"supportPlanId": "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=",
"fileWorkspaceName": "testticket",
"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",
"supportPlanDisplayName": "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/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/supportTickets/testticket?api-version=2024-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",
"advancedDiagnosticConsent": "Yes",
"supportPlanId": "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=",
"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 typing import Any, IO, Union
from azure.identity import DefaultAzureCredential
from azure.mgmt.support import MicrosoftSupport
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-support
# USAGE
python create_machine_learning_quota_ticket_for_dedicated_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="132d901f-189d-4381-9214-fe68e27e05a1",
)
response = client.support_tickets.begin_create(
support_ticket_name="testticket",
create_support_ticket_parameters={
"properties": {
"advancedDiagnosticConsent": "Yes",
"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",
"supportPlanId": "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=",
"title": "my title",
}
},
).result()
print(response)
# x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-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/106483d9f698ac3b6c0d481ab0c5fab14152e21f/specification/support/resource-manager/Microsoft.Support/stable/2024-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"),
AdvancedDiagnosticConsent: to.Ptr(armsupport.ConsentYes),
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),
SupportPlanID: to.Ptr("U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw="),
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/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/supportTickets/testticket"),
// Properties: &armsupport.TicketDetailsProperties{
// Description: to.Ptr("my description"),
// AdvancedDiagnosticConsent: to.Ptr(armsupport.ConsentYes),
// 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}()),
// FileWorkspaceName: to.Ptr("testticket"),
// 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{
// },
// SupportPlanDisplayName: to.Ptr("Premier"),
// SupportPlanID: to.Ptr("U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw="),
// 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/2024-04-01/examples/CreateMachineLearningQuotaTicketForDedicatedCores.json
*/
async function createATicketToRequestQuotaIncreaseForSpecificVMFamilyCoresForMachineLearningService() {
const subscriptionId =
process.env["SUPPORT_SUBSCRIPTION_ID"] || "132d901f-189d-4381-9214-fe68e27e05a1";
const supportTicketName = "testticket";
const createSupportTicketParameters = {
description: "my description",
advancedDiagnosticConsent: "Yes",
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",
supportPlanId:
"U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=",
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 Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Resources;
using Azure.ResourceManager.Support.Models;
using Azure.ResourceManager.Support;
// Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/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://video2.skills-academy.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 = "132d901f-189d-4381-9214-fe68e27e05a1";
ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId);
SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
// get the collection of this SubscriptionSupportTicketResource
SubscriptionSupportTicketCollection collection = subscriptionResource.GetSubscriptionSupportTickets();
// invoke the operation
string supportTicketName = "testticket";
SupportTicketData data = new SupportTicketData("my description", "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/machine_learning_service_problemClassification_guid", SupportSeverityLevel.Moderate, AdvancedDiagnosticConsent.Yes, new SupportContactProfile("abc", "xyz", PreferredContactMethod.Email, "abc@contoso.com", "Pacific Standard Time", "usa", "en-US"), "my title", "/providers/Microsoft.Support/services/quota_service_guid")
{
SupportPlanId = "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=",
QuotaTicketDetails = new QuotaTicketDetails()
{
QuotaChangeRequestSubType = "BatchAml",
QuotaChangeRequestVersion = "1.0",
QuotaChangeRequests =
{
new SupportQuotaChangeContent()
{
Region = "EastUS",
Payload = "{\"VMFamily\":\"standardA0_A7Family\",\"NewLimit\":200,\"Type\":\"Dedicated\"}",
}
},
},
};
ArmOperation<SubscriptionSupportTicketResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, supportTicketName, data);
SubscriptionSupportTicketResource 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/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/operationResults/operationid?api-version=2024-04-01
azure-asyncoperation: https://management.azure.com/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/operationsStatus/operationid?api-version=2024-04-01
{
"id": "/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/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,
"advancedDiagnosticConsent": "Yes",
"supportPlanId": "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=",
"fileWorkspaceName": "testticket",
"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",
"supportPlanDisplayName": "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 |
Consent
|
Advanced diagnostic consent to be updated on the support ticket.
|
ContactProfile
|
Contact information associated with the support ticket.
|
ErrorAdditionalInfo
|
The resource management error additional info.
|
ErrorDetail
|
The error detail.
|
ErrorResponse
|
Error response
|
IsTemporaryTicket
|
This property indicates if support ticket is a temporary ticket.
|
PreferredContactMethod
|
Preferred contact method.
|
QuotaChangeRequest
|
This property is required for providing the region and new quota limits.
|
QuotaTicketDetails
|
Additional set of information required for quota increase support ticket for certain quota types, e.g.: Virtual machine cores. Get complete details about Quota payload support request along with examples at Support quota request.
|
SecondaryConsent
|
This property indicates secondary consent for the support ticket.
|
ServiceLevelAgreement
|
Service Level Agreement details for a support ticket.
|
SeverityLevel
|
A value that indicates the urgency of the case, which in turn determines the response time according to the service level agreement of the technical support plan you have with Azure. Note: 'Highest critical impact', also known as the 'Emergency - Severe impact' level in the Azure portal is reserved only for our Premium customers.
|
SupportEngineer
|
Support engineer information.
|
SupportTicketDetails
|
Object that represents SupportTicketDetails resource.
|
TechnicalTicketDetails
|
Additional information for technical support ticket.
|
UserConsent
|
User consent value provided
|
Consent
Advanced diagnostic consent to be updated on the support ticket.
Name |
Type |
Description |
No
|
string
|
|
Yes
|
string
|
|
Contact information associated with the support ticket.
Name |
Type |
Description |
additionalEmailAddresses
|
string[]
|
Additional email addresses listed will be copied on any correspondence about the support ticket.
|
country
|
string
|
Country of the user. This is the ISO 3166-1 alpha-3 code.
|
firstName
|
string
|
First name.
|
lastName
|
string
|
Last name.
|
phoneNumber
|
string
|
Phone number. This is required if preferred contact method is phone.
|
preferredContactMethod
|
PreferredContactMethod
|
Preferred contact method.
|
preferredSupportLanguage
|
string
|
Preferred language of support from Azure. Support languages vary based on the severity you choose for your support ticket. Learn more at Azure Severity and responsiveness. Use the standard language-country code. Valid values are 'en-us' for English, 'zh-hans' for Chinese, 'es-es' for Spanish, 'fr-fr' for French, 'ja-jp' for Japanese, 'ko-kr' for Korean, 'ru-ru' for Russian, 'pt-br' for Portuguese, 'it-it' for Italian, 'zh-tw' for Chinese and 'de-de' for German.
|
preferredTimeZone
|
string
|
Time zone of the user. This is the name of the time zone from Microsoft Time Zone Index Values.
|
primaryEmailAddress
|
string
|
Primary email address.
|
ErrorAdditionalInfo
The resource management error additional info.
Name |
Type |
Description |
info
|
object
|
The additional info.
|
type
|
string
|
The additional info type.
|
ErrorDetail
The error detail.
Name |
Type |
Description |
additionalInfo
|
ErrorAdditionalInfo[]
|
The error additional info.
|
code
|
string
|
The error code.
|
details
|
ErrorDetail[]
|
The error details.
|
message
|
string
|
The error message.
|
target
|
string
|
The error target.
|
ErrorResponse
Error response
Name |
Type |
Description |
error
|
ErrorDetail
|
The error object.
|
IsTemporaryTicket
This property indicates if support ticket is a temporary ticket.
Name |
Type |
Description |
No
|
string
|
|
Yes
|
string
|
|
Preferred contact method.
Name |
Type |
Description |
email
|
string
|
|
phone
|
string
|
|
QuotaChangeRequest
This property is required for providing the region and new quota limits.
Name |
Type |
Description |
payload
|
string
|
Payload of the quota increase request.
|
region
|
string
|
Region for which the quota increase request is being made.
|
QuotaTicketDetails
Additional set of information required for quota increase support ticket for certain quota types, e.g.: Virtual machine cores. Get complete details about Quota payload support request along with examples at Support quota request.
Name |
Type |
Description |
quotaChangeRequestSubType
|
string
|
Required for certain quota types when there is a sub type, such as Batch, for which you are requesting a quota increase.
|
quotaChangeRequestVersion
|
string
|
Quota change request version.
|
quotaChangeRequests
|
QuotaChangeRequest[]
|
This property is required for providing the region and new quota limits.
|
SecondaryConsent
This property indicates secondary consent for the support ticket.
Name |
Type |
Description |
type
|
string
|
The service name for which the secondary consent is being provided. The value needs to be retrieved from the Problem Classification API response.
|
userConsent
|
UserConsent
|
User consent value provided
|
ServiceLevelAgreement
Service Level Agreement details for a support ticket.
Name |
Type |
Description |
expirationTime
|
string
|
Time in UTC (ISO 8601 format) when the service level agreement expires.
|
slaMinutes
|
integer
|
Service Level Agreement in minutes.
|
startTime
|
string
|
Time in UTC (ISO 8601 format) when the service level agreement starts.
|
SeverityLevel
A value that indicates the urgency of the case, which in turn determines the response time according to the service level agreement of the technical support plan you have with Azure. Note: 'Highest critical impact', also known as the 'Emergency - Severe impact' level in the Azure portal is reserved only for our Premium customers.
Name |
Type |
Description |
critical
|
string
|
|
highestcriticalimpact
|
string
|
|
minimal
|
string
|
|
moderate
|
string
|
|
SupportEngineer
Support engineer information.
Name |
Type |
Description |
emailAddress
|
string
|
Email address of the Azure Support engineer assigned to the support ticket.
|
SupportTicketDetails
Object that represents SupportTicketDetails resource.
Name |
Type |
Description |
id
|
string
|
Id of the resource.
|
name
|
string
|
Name of the resource.
|
properties.advancedDiagnosticConsent
|
Consent
|
Advanced diagnostic consent to be updated on the support ticket.
|
properties.contactDetails
|
ContactProfile
|
Contact information of the user requesting to create a support ticket.
|
properties.createdDate
|
string
|
Time in UTC (ISO 8601 format) when the support ticket was created.
|
properties.description
|
string
|
Detailed description of the question or issue.
|
properties.enrollmentId
|
string
|
Enrollment Id associated with the support ticket.
|
properties.fileWorkspaceName
|
string
|
File workspace name.
|
properties.isTemporaryTicket
|
IsTemporaryTicket
|
This property indicates if support ticket is a temporary ticket.
|
properties.modifiedDate
|
string
|
Time in UTC (ISO 8601 format) when the support ticket was last modified.
|
properties.problemClassificationDisplayName
|
string
|
Localized name of problem classification.
|
properties.problemClassificationId
|
string
|
Each Azure service has its own set of issue categories, also known as problem classification. This parameter is the unique Id for the type of problem you are experiencing.
|
properties.problemScopingQuestions
|
string
|
Problem scoping questions associated with the support ticket.
|
properties.problemStartTime
|
string
|
Time in UTC (ISO 8601 format) when the problem started.
|
properties.quotaTicketDetails
|
QuotaTicketDetails
|
Additional ticket details associated with a quota support ticket request.
|
properties.require24X7Response
|
boolean
|
Indicates if this requires a 24x7 response from Azure.
|
properties.secondaryConsent
|
SecondaryConsent[]
|
This property indicates secondary consents for the support ticket
|
properties.serviceDisplayName
|
string
|
Localized name of the Azure service.
|
properties.serviceId
|
string
|
This is the resource Id of the Azure service resource associated with the support ticket.
|
properties.serviceLevelAgreement
|
ServiceLevelAgreement
|
Service Level Agreement information for this support ticket.
|
properties.severity
|
SeverityLevel
|
A value that indicates the urgency of the case, which in turn determines the response time according to the service level agreement of the technical support plan you have with Azure. Note: 'Highest critical impact', also known as the 'Emergency - Severe impact' level in the Azure portal is reserved only for our Premium customers.
|
properties.status
|
string
|
Status of the support ticket.
|
properties.supportEngineer
|
SupportEngineer
|
Information about the support engineer working on this support ticket.
|
properties.supportPlanDisplayName
|
string
|
Support plan type associated with the support ticket.
|
properties.supportPlanId
|
string
|
Support plan id associated with the support ticket.
|
properties.supportPlanType
|
string
|
Support plan type associated with the support ticket.
|
properties.supportTicketId
|
string
|
System generated support ticket Id that is unique.
|
properties.technicalTicketDetails
|
TechnicalTicketDetails
|
Additional ticket details associated with a technical support ticket request.
|
properties.title
|
string
|
Title of the support ticket.
|
type
|
string
|
Type of the resource 'Microsoft.Support/supportTickets'.
|
TechnicalTicketDetails
Additional information for technical support ticket.
Name |
Type |
Description |
resourceId
|
string
|
This is the resource Id of the Azure service resource (For example: A virtual machine resource or an HDInsight resource) for which the support ticket is created.
|
UserConsent
User consent value provided
Name |
Type |
Description |
No
|
string
|
|
Yes
|
string
|
|