지정된 구독에 대한 구독 및 서비스 제한(할당량), 기술, 청구 및 구독 관리 문제에 대한 새 지원 티켓을 만듭니다. 지원 티켓을 만드는 데 필요한 필수 구성 요소를 알아봅니다.
항상 Services 및 ProblemClassifications API를 호출하여 지원 티켓 생성에 필요한 최신 서비스 및 문제 범주 집합을 가져옵니다.
첨부 파일 추가는 현재 API를 통해 지원되지 않습니다. 기존 지원 티켓에 파일을 추가하려면 Azure Portal의 지원 티켓 관리 페이지를 방문하여 지원 티켓을 선택하고 파일 업로드 컨트롤을 사용하여 새 파일을 추가합니다.
Azure 지원과 진단 정보를 공유하는 데 동의를 제공하는 것은 현재 API를 통해 지원되지 않습니다. 문제가 Azure 리소스에서 진단 정보를 수집해야 하는 경우 티켓에 대해 작업하는 Azure 지원 엔지니어가 동의를 요청합니다.
on-behalf-of에 대한 지원 티켓 만들기: 설명서에 따라 보조 토큰을 제공하는 x-ms-authorization-auxiliary 헤더를 포함합니다. 기본 토큰은 구독에 대해 지원 티켓이 제기되는 테넌트(예: CSP(클라우드 솔루션 공급자) 고객 테넌트의 토큰입니다. 보조 토큰은 CSP(클라우드 솔루션 공급자) 파트너 테넌트에서 제공됩니다.
PUT https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Support/supportTickets/{supportTicketName}?api-version=2024-04-01
URI 매개 변수
Name |
In(다음 안에) |
필수 |
형식 |
Description |
subscriptionId
|
path |
True
|
string
(uuid)
|
대상 구독의 ID입니다. 값은 UUID여야 합니다.
|
supportTicketName
|
path |
True
|
string
|
지원 티켓 이름입니다.
|
api-version
|
query |
True
|
string
minLength: 1
|
이 작업에 사용할 API 버전입니다.
|
요청 본문
Name |
필수 |
형식 |
Description |
properties.advancedDiagnosticConsent
|
True
|
Consent
|
지원 티켓에서 업데이트할 고급 진단 동의입니다.
|
properties.contactDetails
|
True
|
ContactProfile
|
지원 티켓을 만들도록 요청하는 사용자의 연락처 정보입니다.
|
properties.description
|
True
|
string
|
질문 또는 문제에 대한 자세한 설명입니다.
|
properties.problemClassificationId
|
True
|
string
|
각 Azure 서비스에는 문제 분류라고도 하는 고유한 문제 범주 집합이 있습니다. 이 매개 변수는 발생한 문제 유형에 대한 고유 ID입니다.
|
properties.serviceId
|
True
|
string
|
지원 티켓과 연결된 Azure 서비스 리소스의 리소스 ID입니다.
|
properties.severity
|
True
|
SeverityLevel
|
사례의 긴급성을 나타내는 값으로, Azure와 함께 사용하는 기술 지원 계획의 서비스 수준 계약에 따라 응답 시간을 결정합니다. 참고: Azure Portal에서 '응급 - 심각한 영향' 수준이라고도 하는 '가장 중요한 영향'은 프리미엄 고객만을 위해 예약되어 있습니다.
|
properties.title
|
True
|
string
|
지원 티켓의 제목입니다.
|
properties.enrollmentId
|
|
string
|
지원 티켓과 연결된 등록 ID입니다.
|
properties.fileWorkspaceName
|
|
string
|
파일 작업 영역 이름입니다.
|
properties.problemScopingQuestions
|
|
string
|
지원 티켓과 관련된 질문의 범위를 지정하는 문제입니다.
|
properties.problemStartTime
|
|
string
(date-time)
|
문제가 시작된 시간(ISO 8601 형식)입니다.
|
properties.quotaTicketDetails
|
|
QuotaTicketDetails
|
할당량 지원 티켓 요청과 관련된 추가 티켓 세부 정보입니다.
|
properties.require24X7Response
|
|
boolean
|
Azure에서 24x7 응답이 필요한지 나타냅니다.
|
properties.secondaryConsent
|
|
SecondaryConsent[]
|
이 속성은 지원 티켓에 대한 보조 동의를 나타냅니다.
|
properties.serviceLevelAgreement
|
|
ServiceLevelAgreement
|
이 지원 티켓에 대한 서비스 수준 계약 정보입니다.
|
properties.supportEngineer
|
|
SupportEngineer
|
이 지원 티켓에서 작업하는 지원 엔지니어에 대한 정보입니다.
|
properties.supportPlanId
|
|
string
|
지원 티켓과 연결된 지원 계획 ID입니다.
|
properties.supportTicketId
|
|
string
|
시스템에서 생성된 고유한 지원 티켓 ID입니다.
|
properties.technicalTicketDetails
|
|
TechnicalTicketDetails
|
기술 지원 티켓 요청과 관련된 추가 티켓 세부 정보입니다.
|
응답
Name |
형식 |
Description |
200 OK
|
SupportTicketDetails
|
확인 - SupportTicket가 성공적으로 생성되었습니다.
|
202 Accepted
|
|
수락되면 SupportTicket가 비동기적으로 만들어집니다.
|
Other Status Codes
|
ErrorResponse
|
작업이 실패한 이유를 설명하는 오류 응답입니다.
|
보안
azure_auth
Azure Active Directory OAuth2 Flow.
형식:
oauth2
Flow:
implicit
권한 부여 URL:
https://login.microsoftonline.com/common/oauth2/authorize
범위
Name |
Description |
user_impersonation
|
사용자 계정 가장
|
예제
샘플 요청
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"
}
}
}
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.SeverityLevel;
/**
* Samples for SupportTickets Create.
*/
public final class Main {
/*
* 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();
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
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://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this SubscriptionResource created on azure
// for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource
string subscriptionId = "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
샘플 응답
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"
}
}
샘플 요청
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"
}
}
}
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.SeverityLevel;
/**
* Samples for SupportTickets Create.
*/
public final class Main {
/*
* 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();
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
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://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this SubscriptionResource created on azure
// for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource
string subscriptionId = "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
샘플 응답
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"
}
}
샘플 요청
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"
}
}
}
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.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/
* 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();
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
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://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this SubscriptionResource created on azure
// for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource
string subscriptionId = "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
샘플 응답
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
샘플 요청
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\"}"
}
]
}
}
}
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.SeverityLevel;
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();
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
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://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this SubscriptionResource created on azure
// for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource
string subscriptionId = "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
샘플 응답
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
샘플 요청
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\"}"
}
]
}
}
}
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.SeverityLevel;
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/
* 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();
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
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://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this SubscriptionResource created on azure
// for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource
string subscriptionId = "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
샘플 응답
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
샘플 요청
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\"}"
}
]
}
}
}
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.SeverityLevel;
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();
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
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://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this SubscriptionResource created on azure
// for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource
string subscriptionId = "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
샘플 응답
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
샘플 요청
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}"
}
]
}
}
}
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.SeverityLevel;
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/
* 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
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://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this SubscriptionResource created on azure
// for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource
string subscriptionId = "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
샘플 응답
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
샘플 요청
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}"
}
]
}
}
}
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.SeverityLevel;
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();
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
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://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this SubscriptionResource created on azure
// for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource
string subscriptionId = "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
샘플 응답
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
샘플 요청
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}"
}
]
}
}
}
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.SeverityLevel;
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();
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
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://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this SubscriptionResource created on azure
// for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource
string subscriptionId = "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
샘플 응답
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
샘플 요청
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\"}"
}
]
}
}
}
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.SeverityLevel;
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/
* 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();
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
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://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this SubscriptionResource created on azure
// for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource
string subscriptionId = "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
샘플 응답
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
샘플 요청
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\"}"
}
]
}
}
}
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.SeverityLevel;
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();
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
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://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this SubscriptionResource created on azure
// for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource
string subscriptionId = "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
샘플 응답
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
샘플 요청
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\"}"
}
]
}
}
}
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.SeverityLevel;
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/
* 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();
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
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://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this SubscriptionResource created on azure
// for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource
string subscriptionId = "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
샘플 응답
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
샘플 요청
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}"
}
]
}
}
}
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.SeverityLevel;
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/
* 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();
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
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://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this SubscriptionResource created on azure
// for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource
string subscriptionId = "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
샘플 응답
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
샘플 요청
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}"
}
]
}
}
}
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.SeverityLevel;
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/
* 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();
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
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://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this SubscriptionResource created on azure
// for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource
string subscriptionId = "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
샘플 응답
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
샘플 요청
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"
}
}
}
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.SeverityLevel;
/**
* Samples for SupportTickets Create.
*/
public final class Main {
/*
* 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();
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
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://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this SubscriptionResource created on azure
// for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource
string subscriptionId = "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
샘플 응답
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
샘플 요청
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\"}"
}
]
}
}
}
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.SeverityLevel;
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/
* 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();
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
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://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this SubscriptionResource created on azure
// for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource
string subscriptionId = "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
샘플 응답
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
샘플 요청
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\"}"
}
]
}
}
}
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.SeverityLevel;
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/
* 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();
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
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://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this SubscriptionResource created on azure
// for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource
string subscriptionId = "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
샘플 응답
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"
}
}
정의
Consent
열거형
지원 티켓에서 업데이트할 고급 진단 동의입니다.
Object
지원 티켓과 관련된 연락처 정보입니다.
Name |
형식 |
Description |
additionalEmailAddresses
|
string[]
|
나열된 추가 전자 메일 주소는 지원 티켓에 대한 모든 서신에 복사됩니다.
|
country
|
string
|
사용자의 국가입니다. ISO 3166-1 alpha-3 코드입니다.
|
firstName
|
string
|
이름.
|
lastName
|
string
|
성.
|
phoneNumber
|
string
|
전화번호. 기본 연락처 방법이 전화인 경우 이 방법이 필요합니다. 또한 '위험' 또는 'highestcriticalimpact' 심각도 사례를 제출할 때도 필요합니다.
|
preferredContactMethod
|
PreferredContactMethod
|
기본 연락처 방법입니다.
|
preferredSupportLanguage
|
string
|
Azure에서 지원하는 기본 설정 언어입니다. 지원 언어는 지원 티켓에 대해 선택한 심각도에 따라 달라집니다. Azure 심각도 및 응답성 자세히 알아보세요. 표준 언어 국가 코드를 사용합니다. 유효한 값은 영어의 경우 'en-us', 중국어의 경우 'zh-hans', 스페인어의 경우 'es-es', 프랑스어의 경우 'fr-fr' 'ja-jp', 한국어의 경우 'ko-kr', 러시아어의 경우 'ru-ru', 포르투갈어의 경우 'pt-br', 이탈리아어의 경우 'it-it', 중국어의 경우 'zh-tw' 및 독일어의 경우 'de-de'입니다.
|
preferredTimeZone
|
string
|
사용자의 표준 시간대입니다. microsoft 표준 시간대 인덱스 값 표준 시간대의 이름입니다.
|
primaryEmailAddress
|
string
|
기본 전자 메일 주소입니다.
|
ErrorAdditionalInfo
Object
리소스 관리 오류 추가 정보입니다.
Name |
형식 |
Description |
info
|
object
|
추가 정보입니다.
|
type
|
string
|
추가 정보 유형입니다.
|
ErrorDetail
Object
오류 세부 정보입니다.
Name |
형식 |
Description |
additionalInfo
|
ErrorAdditionalInfo[]
|
오류 추가 정보입니다.
|
code
|
string
|
오류 코드입니다.
|
details
|
ErrorDetail[]
|
오류 세부 정보입니다.
|
message
|
string
|
오류 메시지입니다.
|
target
|
string
|
오류 대상입니다.
|
ErrorResponse
Object
오류 응답
IsTemporaryTicket
열거형
이 속성은 지원 티켓이 임시 티켓인지를 나타냅니다.
열거형
기본 연락처 방법입니다.
값 |
Description |
email
|
|
phone
|
|
QuotaChangeRequest
Object
이 속성은 지역 및 새 할당량 제한을 제공하는 데 필요합니다.
Name |
형식 |
Description |
payload
|
string
|
할당량 증가 요청의 페이로드입니다.
|
region
|
string
|
할당량 증가 요청이 이루어지는 지역입니다.
|
QuotaTicketDetails
Object
특정 할당량 유형에 대한 할당량 증가 지원 티켓에 필요한 추가 정보 집합(예: 가상 머신 코어). 지원 할당량 요청의 예제와 함께 할당량 페이로드 지원 요청에 대한 전체 세부 정보를 가져옵니다.
Name |
형식 |
Description |
quotaChangeRequestSubType
|
string
|
할당량 증가를 요청하는 Batch와 같은 하위 형식이 있는 경우 특정 할당량 유형에 필요합니다.
|
quotaChangeRequestVersion
|
string
|
할당량 변경 요청 버전입니다.
|
quotaChangeRequests
|
QuotaChangeRequest[]
|
이 속성은 지역 및 새 할당량 제한을 제공하는 데 필요합니다.
|
SecondaryConsent
Object
이 속성은 지원 티켓에 대한 보조 동의를 나타냅니다.
Name |
형식 |
Description |
type
|
string
|
보조 동의가 제공되는 서비스 이름입니다. 문제 분류 API 응답에서 값을 검색해야 합니다.
|
userConsent
|
UserConsent
|
제공된 사용자 동의 값
|
ServiceLevelAgreement
Object
지원 티켓에 대한 서비스 수준 계약 세부 정보입니다.
Name |
형식 |
Description |
expirationTime
|
string
(date-time)
|
서비스 수준 계약이 만료되는 시간(ISO 8601 형식)입니다.
|
slaMinutes
|
integer
(int32)
|
서비스 수준 계약(분)입니다.
|
startTime
|
string
(date-time)
|
서비스 수준 계약이 시작되는 시간(ISO 8601 형식)입니다.
|
SeverityLevel
열거형
사례의 긴급성을 나타내는 값으로, Azure와 함께 사용하는 기술 지원 계획의 서비스 수준 계약에 따라 응답 시간을 결정합니다. 참고: Azure Portal에서 '응급 - 심각한 영향' 수준이라고도 하는 '가장 중요한 영향'은 프리미엄 고객만을 위해 예약되어 있습니다.
값 |
Description |
critical
|
|
highestcriticalimpact
|
|
minimal
|
|
moderate
|
|
SupportEngineer
Object
지원 엔지니어 정보입니다.
Name |
형식 |
Description |
emailAddress
|
string
|
지원 티켓에 할당된 Azure 지원 엔지니어의 이메일 주소입니다.
|
SupportTicketDetails
Object
SupportTicketDetails 리소스를 나타내는 개체입니다.
Name |
형식 |
Description |
id
|
string
|
리소스의 ID입니다.
|
name
|
string
|
리소스의 이름입니다.
|
properties.advancedDiagnosticConsent
|
Consent
|
지원 티켓에서 업데이트할 고급 진단 동의입니다.
|
properties.contactDetails
|
ContactProfile
|
지원 티켓을 만들도록 요청하는 사용자의 연락처 정보입니다.
|
properties.createdDate
|
string
(date-time)
|
지원 티켓을 만든 시간(ISO 8601 형식)입니다.
|
properties.description
|
string
|
질문 또는 문제에 대한 자세한 설명입니다.
|
properties.enrollmentId
|
string
|
지원 티켓과 연결된 등록 ID입니다.
|
properties.fileWorkspaceName
|
string
|
파일 작업 영역 이름입니다.
|
properties.isTemporaryTicket
|
IsTemporaryTicket
|
이 속성은 지원 티켓이 임시 티켓인지를 나타냅니다.
|
properties.modifiedDate
|
string
(date-time)
|
지원 티켓이 마지막으로 수정된 시간(ISO 8601 형식)입니다.
|
properties.problemClassificationDisplayName
|
string
|
문제 분류의 지역화된 이름입니다.
|
properties.problemClassificationId
|
string
|
각 Azure 서비스에는 문제 분류라고도 하는 고유한 문제 범주 집합이 있습니다. 이 매개 변수는 발생한 문제 유형에 대한 고유 ID입니다.
|
properties.problemScopingQuestions
|
string
|
지원 티켓과 관련된 질문의 범위를 지정하는 문제입니다.
|
properties.problemStartTime
|
string
(date-time)
|
문제가 시작된 시간(ISO 8601 형식)입니다.
|
properties.quotaTicketDetails
|
QuotaTicketDetails
|
할당량 지원 티켓 요청과 관련된 추가 티켓 세부 정보입니다.
|
properties.require24X7Response
|
boolean
|
Azure에서 24x7 응답이 필요한지 나타냅니다.
|
properties.secondaryConsent
|
SecondaryConsent[]
|
이 속성은 지원 티켓에 대한 보조 동의를 나타냅니다.
|
properties.serviceDisplayName
|
string
|
Azure 서비스의 지역화된 이름입니다.
|
properties.serviceId
|
string
|
지원 티켓과 연결된 Azure 서비스 리소스의 리소스 ID입니다.
|
properties.serviceLevelAgreement
|
ServiceLevelAgreement
|
이 지원 티켓에 대한 서비스 수준 계약 정보입니다.
|
properties.severity
|
SeverityLevel
|
사례의 긴급성을 나타내는 값으로, Azure와 함께 사용하는 기술 지원 계획의 서비스 수준 계약에 따라 응답 시간을 결정합니다. 참고: Azure Portal에서 '응급 - 심각한 영향' 수준이라고도 하는 '가장 중요한 영향'은 프리미엄 고객만을 위해 예약되어 있습니다.
|
properties.status
|
string
|
지원 티켓의 상태입니다.
|
properties.supportEngineer
|
SupportEngineer
|
이 지원 티켓에서 작업하는 지원 엔지니어에 대한 정보입니다.
|
properties.supportPlanDisplayName
|
string
|
지원 티켓과 연결된 지원 플랜 유형입니다.
|
properties.supportPlanId
|
string
|
지원 티켓과 연결된 지원 계획 ID입니다.
|
properties.supportPlanType
|
string
|
지원 티켓과 연결된 지원 플랜 유형입니다.
|
properties.supportTicketId
|
string
|
시스템에서 생성된 고유한 지원 티켓 ID입니다.
|
properties.technicalTicketDetails
|
TechnicalTicketDetails
|
기술 지원 티켓 요청과 관련된 추가 티켓 세부 정보입니다.
|
properties.title
|
string
|
지원 티켓의 제목입니다.
|
type
|
string
|
리소스 'Microsoft.Support/supportTickets'의 유형입니다.
|
TechnicalTicketDetails
Object
기술 지원 티켓에 대한 추가 정보입니다.
Name |
형식 |
Description |
resourceId
|
string
|
지원 티켓이 만들어지는 Azure 서비스 리소스(예: 가상 머신 리소스 또는 HDInsight 리소스)의 리소스 ID입니다.
|
UserConsent
열거형
제공된 사용자 동의 값