You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/** * Samples for ChatTranscripts Get. */publicfinalclassChatTranscriptsGetSamples {
/* * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetchatTranscriptDetailsForSubscriptionSupportTicket.json *//** * Sample code: Get chat transcript details for a subscription support ticket. * * @param manager Entry point to SupportManager. */publicstaticvoidgetChatTranscriptDetailsForASubscriptionSupportTicket(
com.azure.resourcemanager.support.SupportManagermanager) {
manager.chatTranscripts()
.getWithResponse("testticket", "69586795-45e9-45b5-bd9e-c9bb237d3e44", com.azure.core.util.Context.NONE);
}
}
ChatTranscripts_List
/** * Samples for ChatTranscripts List. */publicfinalclassChatTranscriptsListSamples {
/* * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/ListChatTranscriptsForSubscriptionSupportTicket.json *//** * Sample code: List chat transcripts for a subscription support ticket. * * @param manager Entry point to SupportManager. */publicstaticvoidlistChatTranscriptsForASubscriptionSupportTicket(com.azure.resourcemanager.support.SupportManagermanager) {
manager.chatTranscripts().list("testticket", com.azure.core.util.Context.NONE);
}
}
ChatTranscriptsNoSubscription_Get
/** * Samples for ChatTranscriptsNoSubscription Get. */publicfinalclassChatTranscriptsNoSubscriptionGetSamples {
/* * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetchatTranscriptDetailsForSupportTicket.json *//** * Sample code: Get chat transcript details for a subscription support ticket. * * @param manager Entry point to SupportManager. */publicstaticvoidgetChatTranscriptDetailsForASubscriptionSupportTicket(
com.azure.resourcemanager.support.SupportManagermanager) {
manager.chatTranscriptsNoSubscriptions()
.getWithResponse("testticket", "b371192a-b094-4a71-b093-7246029b0a54", com.azure.core.util.Context.NONE);
}
}
ChatTranscriptsNoSubscription_List
/** * Samples for ChatTranscriptsNoSubscription List. */publicfinalclassChatTranscriptsNoSubscriptionListSamples {
/* * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/ListChatTranscriptsForSupportTicket.json *//** * Sample code: List chat transcripts for a no-subscription support ticket. * * @param manager Entry point to SupportManager. */publicstaticvoidlistChatTranscriptsForANoSubscriptionSupportTicket(com.azure.resourcemanager.support.SupportManagermanager) {
manager.chatTranscriptsNoSubscriptions().list("testticket", com.azure.core.util.Context.NONE);
}
}
Communications_CheckNameAvailability
importcom.azure.resourcemanager.support.models.CheckNameAvailabilityInput;
importcom.azure.resourcemanager.support.models.Type;
/** * Samples for Communications CheckNameAvailability. */publicfinalclassCommunicationsCheckNameAvailabilitySamples {
/* * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CheckNameAvailabilityForSupportTicketCommunication.json *//** * Sample code: Checks whether name is available for Communication resource for a subscription support ticket. * * @param manager Entry point to SupportManager. */publicstaticvoidchecksWhetherNameIsAvailableForCommunicationResourceForASubscriptionSupportTicket(
com.azure.resourcemanager.support.SupportManagermanager) {
manager.communications()
.checkNameAvailabilityWithResponse("testticket",
newCheckNameAvailabilityInput().withName("sampleName").withType(Type.MICROSOFT_SUPPORT_COMMUNICATIONS),
com.azure.core.util.Context.NONE);
}
}
Communications_Create
/** * Samples for Communications Create. */publicfinalclassCommunicationsCreateSamples {
/* * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CreateSupportTicketCommunication.json *//** * Sample code: AddCommunicationToSubscriptionTicket. * * @param manager Entry point to SupportManager. */publicstaticvoidaddCommunicationToSubscriptionTicket(com.azure.resourcemanager.support.SupportManagermanager) {
manager.communications()
.define("testcommunication")
.withExistingSupportTicket("testticket")
.withSubject("This is a test message from a customer!")
.withBody("This is a test message from a customer!")
.withSender("user@contoso.com")
.create();
}
}
Communications_Get
/** * Samples for Communications Get. */publicfinalclassCommunicationsGetSamples {
/* * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetCommunicationDetailsForSubscriptionSupportTicket.json *//** * Sample code: Get communication details for a subscription support ticket. * * @param manager Entry point to SupportManager. */publicstaticvoidgetCommunicationDetailsForASubscriptionSupportTicket(com.azure.resourcemanager.support.SupportManagermanager) {
manager.communications().getWithResponse("testticket", "testmessage", com.azure.core.util.Context.NONE);
}
}
Communications_List
/** * Samples for Communications List. */publicfinalclassCommunicationsListSamples {
/* * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/ListCommunicationsForSubscriptionSupportTicket.json *//** * Sample code: List communications for a subscription support ticket. * * @param manager Entry point to SupportManager. */publicstaticvoidlistCommunicationsForASubscriptionSupportTicket(com.azure.resourcemanager.support.SupportManagermanager) {
manager.communications().list("testticket", null, null, com.azure.core.util.Context.NONE);
}
/* * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/ListWebCommunicationsForSubscriptionSupportTicket.json *//** * Sample code: List web communications for a subscription support ticket. * * @param manager Entry point to SupportManager. */publicstaticvoidlistWebCommunicationsForASubscriptionSupportTicket(com.azure.resourcemanager.support.SupportManagermanager) {
manager.communications()
.list("testticket", null, "communicationType eq 'web'", com.azure.core.util.Context.NONE);
}
/* * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/ListWebCommunicationsForSubscriptionSupportTicketCreatedOnOrAfter.json *//** * Sample code: List web communication created on or after a specific date for a subscription support ticket. * * @param manager Entry point to SupportManager. */publicstaticvoidlistWebCommunicationCreatedOnOrAfterASpecificDateForASubscriptionSupportTicket(
com.azure.resourcemanager.support.SupportManagermanager) {
manager.communications()
.list("testticket", null, "communicationType eq 'web' and createdDate ge 2020-03-10T22:08:51Z",
com.azure.core.util.Context.NONE);
}
}
importcom.azure.resourcemanager.support.models.CheckNameAvailabilityInput;
importcom.azure.resourcemanager.support.models.Type;
/** * Samples for CommunicationsNoSubscription CheckNameAvailability. */publicfinalclassCommunicationsNoSubscriptionCheckNameAvailabilitySamples {
/* * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CheckNameAvailabilityForNoSubscriptionSupportTicketCommunication.json *//** * Sample code: Checks whether name is available for Communication resource. * * @param manager Entry point to SupportManager. */publicstaticvoidchecksWhetherNameIsAvailableForCommunicationResource(com.azure.resourcemanager.support.SupportManagermanager) {
manager.communicationsNoSubscriptions()
.checkNameAvailabilityWithResponse("testticket",
newCheckNameAvailabilityInput().withName("sampleName").withType(Type.MICROSOFT_SUPPORT_COMMUNICATIONS),
com.azure.core.util.Context.NONE);
}
}
CommunicationsNoSubscription_Create
importcom.azure.resourcemanager.support.fluent.models.CommunicationDetailsInner;
/** * Samples for CommunicationsNoSubscription Create. */publicfinalclassCommunicationsNoSubscriptionCreateSamples {
/* * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CreateNoSubscriptionSupportTicketCommunication.json *//** * Sample code: AddCommunicationToNoSubscriptionTicket. * * @param manager Entry point to SupportManager. */publicstaticvoidaddCommunicationToNoSubscriptionTicket(com.azure.resourcemanager.support.SupportManagermanager) {
manager.communicationsNoSubscriptions()
.create("testticket", "testcommunication",
newCommunicationDetailsInner().withSender("user@contoso.com")
.withSubject("This is a test message from a customer!")
.withBody("This is a test message from a customer!"),
com.azure.core.util.Context.NONE);
}
}
CommunicationsNoSubscription_Get
/** * Samples for CommunicationsNoSubscription Get. */publicfinalclassCommunicationsNoSubscriptionGetSamples {
/* * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetCommunicationDetailsForSupportTicket.json *//** * Sample code: Get communication details for a no-subscription support ticket. * * @param manager Entry point to SupportManager. */publicstaticvoidgetCommunicationDetailsForANoSubscriptionSupportTicket(
com.azure.resourcemanager.support.SupportManagermanager) {
manager.communicationsNoSubscriptions()
.getWithResponse("testticket", "testmessage", com.azure.core.util.Context.NONE);
}
}
CommunicationsNoSubscription_List
/** * Samples for CommunicationsNoSubscription List. */publicfinalclassCommunicationsNoSubscriptionListSamples {
/* * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/ListCommunicationsForSupportTicket.json *//** * Sample code: List communications for a no-subscription support ticket. * * @param manager Entry point to SupportManager. */publicstaticvoidlistCommunicationsForANoSubscriptionSupportTicket(com.azure.resourcemanager.support.SupportManagermanager) {
manager.communicationsNoSubscriptions().list("testticket", null, null, com.azure.core.util.Context.NONE);
}
/* * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/ListWebCommunicationsForSupportTicketCreatedOnOrAfter.json *//** * Sample code: List web communication created on or after a specific date for a no-subscription support ticket. * * @param manager Entry point to SupportManager. */publicstaticvoidlistWebCommunicationCreatedOnOrAfterASpecificDateForANoSubscriptionSupportTicket(
com.azure.resourcemanager.support.SupportManagermanager) {
manager.communicationsNoSubscriptions()
.list("testticket", null, "communicationType eq 'web' and createdDate ge 2020-03-10T22:08:51Z",
com.azure.core.util.Context.NONE);
}
/* * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/ListWebCommunicationsForSupportTicket.json *//** * Sample code: List web communications for a no-subscription support ticket. * * @param manager Entry point to SupportManager. */publicstaticvoidlistWebCommunicationsForANoSubscriptionSupportTicket(com.azure.resourcemanager.support.SupportManagermanager) {
manager.communicationsNoSubscriptions()
.list("testticket", null, "communicationType eq 'web'", com.azure.core.util.Context.NONE);
}
}
FileWorkspaces_Create
/** * Samples for FileWorkspaces Create. */publicfinalclassFileWorkspacesCreateSamples {
/* * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CreateFileWorkspaceForSubscription.json *//** * Sample code: Create a file workspace for a subscription. * * @param manager Entry point to SupportManager. */publicstaticvoidcreateAFileWorkspaceForASubscription(com.azure.resourcemanager.support.SupportManagermanager) {
manager.fileWorkspaces().createWithResponse("testworkspace", com.azure.core.util.Context.NONE);
}
}
FileWorkspaces_Get
/** * Samples for FileWorkspaces Get. */publicfinalclassFileWorkspacesGetSamples {
/* * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetFileWorkspaceDetailsForSubscription.json *//** * Sample code: Get details of a subscription file workspace. * * @param manager Entry point to SupportManager. */publicstaticvoidgetDetailsOfASubscriptionFileWorkspace(com.azure.resourcemanager.support.SupportManagermanager) {
manager.fileWorkspaces().getWithResponse("testworkspace", com.azure.core.util.Context.NONE);
}
}
FileWorkspacesNoSubscription_Create
/** * Samples for FileWorkspacesNoSubscription Create. */publicfinalclassFileWorkspacesNoSubscriptionCreateSamples {
/* * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CreateFileWorkspace.json *//** * Sample code: Create a file workspace. * * @param manager Entry point to SupportManager. */publicstaticvoidcreateAFileWorkspace(com.azure.resourcemanager.support.SupportManagermanager) {
manager.fileWorkspacesNoSubscriptions().createWithResponse("testworkspace", com.azure.core.util.Context.NONE);
}
}
FileWorkspacesNoSubscription_Get
/** * Samples for FileWorkspacesNoSubscription Get. */publicfinalclassFileWorkspacesNoSubscriptionGetSamples {
/* * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetFileWorkspaceDetails.json *//** * Sample code: Get details of a file workspace. * * @param manager Entry point to SupportManager. */publicstaticvoidgetDetailsOfAFileWorkspace(com.azure.resourcemanager.support.SupportManagermanager) {
manager.fileWorkspacesNoSubscriptions().getWithResponse("testworkspace", com.azure.core.util.Context.NONE);
}
}
Files_Create
/** * Samples for Files Create. */publicfinalclassFilesCreateSamples {
/* * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CreateFileForSubscription.json *//** * Sample code: Create a file under a subscription workspace. * * @param manager Entry point to SupportManager. */publicstaticvoidcreateAFileUnderASubscriptionWorkspace(com.azure.resourcemanager.support.SupportManagermanager) {
manager.files()
.define("test.txt")
.withExistingFileWorkspace("testworkspace")
.withChunkSize(41423)
.withFileSize(41423)
.withNumberOfChunks(1)
.create();
}
}
Files_Get
/** * Samples for Files Get. */publicfinalclassFilesGetSamples {
/* * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetFileDetailsForSubscription.json *//** * Sample code: Get details of a subscription file. * * @param manager Entry point to SupportManager. */publicstaticvoidgetDetailsOfASubscriptionFile(com.azure.resourcemanager.support.SupportManagermanager) {
manager.files().getWithResponse("testworkspace", "test.txt", com.azure.core.util.Context.NONE);
}
}
Files_List
/** * Samples for Files List. */publicfinalclassFilesListSamples {
/* * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/ListFilesForSubscriptionUnderFileWorkspace.json *//** * Sample code: List files under a workspace for a subscription. * * @param manager Entry point to SupportManager. */publicstaticvoidlistFilesUnderAWorkspaceForASubscription(com.azure.resourcemanager.support.SupportManagermanager) {
manager.files().list("testworkspace", com.azure.core.util.Context.NONE);
}
}
/** * Samples for Operations List. */publicfinalclassOperationsListSamples {
/* * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/ListOperations.json *//** * Sample code: Get all operations. * * @param manager Entry point to SupportManager. */publicstaticvoidgetAllOperations(com.azure.resourcemanager.support.SupportManagermanager) {
manager.operations().list(com.azure.core.util.Context.NONE);
}
}
ProblemClassifications_Get
/** * Samples for ProblemClassifications Get. */publicfinalclassProblemClassificationsGetSamples {
/* * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetProblemClassification.json *//** * Sample code: Gets details of problemClassification for Azure service. * * @param manager Entry point to SupportManager. */publicstaticvoidgetsDetailsOfProblemClassificationForAzureService(com.azure.resourcemanager.support.SupportManagermanager) {
manager.problemClassifications()
.getWithResponse("service_guid", "problemClassification_guid", com.azure.core.util.Context.NONE);
}
}
ProblemClassifications_List
/** * Samples for ProblemClassifications List. */publicfinalclassProblemClassificationsListSamples {
/* * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/ListProblemClassifications.json *//** * Sample code: Gets list of problemClassifications for a service for which a support ticket can be created. * * @param manager Entry point to SupportManager. */publicstaticvoidgetsListOfProblemClassificationsForAServiceForWhichASupportTicketCanBeCreated(
com.azure.resourcemanager.support.SupportManagermanager) {
manager.problemClassifications().list("service_guid", com.azure.core.util.Context.NONE);
}
}
Services_Get
/** * Samples for Services Get. */publicfinalclassServicesGetSamples {
/* * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetService.json *//** * Sample code: Gets details of the Azure service. * * @param manager Entry point to SupportManager. */publicstaticvoidgetsDetailsOfTheAzureService(com.azure.resourcemanager.support.SupportManagermanager) {
manager.services().getWithResponse("service_guid", com.azure.core.util.Context.NONE);
}
}
Services_List
/** * Samples for Services List. */publicfinalclassServicesListSamples {
/* * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/ListServices.json *//** * Sample code: Gets list of services for which a support ticket can be created. * * @param manager Entry point to SupportManager. */publicstaticvoidgetsListOfServicesForWhichASupportTicketCanBeCreated(com.azure.resourcemanager.support.SupportManagermanager) {
manager.services().list(com.azure.core.util.Context.NONE);
}
}
SupportTickets_CheckNameAvailability
importcom.azure.resourcemanager.support.models.CheckNameAvailabilityInput;
importcom.azure.resourcemanager.support.models.Type;
/** * Samples for SupportTickets CheckNameAvailability. */publicfinalclassSupportTicketsCheckNameAvailabilitySamples {
/* * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CheckNameAvailabilityWithSubscription.json *//** * Sample code: Checks whether name is available for a subscription support ticket resource. * * @param manager Entry point to SupportManager. */publicstaticvoidchecksWhetherNameIsAvailableForASubscriptionSupportTicketResource(
com.azure.resourcemanager.support.SupportManagermanager) {
manager.supportTickets()
.checkNameAvailabilityWithResponse(newCheckNameAvailabilityInput().withName("sampleName")
.withType(Type.MICROSOFT_SUPPORT_SUPPORT_TICKETS), com.azure.core.util.Context.NONE);
}
}
SupportTickets_Create
importcom.azure.resourcemanager.support.models.Consent;
importcom.azure.resourcemanager.support.models.ContactProfile;
importcom.azure.resourcemanager.support.models.PreferredContactMethod;
importcom.azure.resourcemanager.support.models.QuotaChangeRequest;
importcom.azure.resourcemanager.support.models.QuotaTicketDetails;
importcom.azure.resourcemanager.support.models.SecondaryConsent;
importcom.azure.resourcemanager.support.models.SeverityLevel;
importcom.azure.resourcemanager.support.models.TechnicalTicketDetails;
importcom.azure.resourcemanager.support.models.UserConsent;
importjava.util.Arrays;
/** * Samples for SupportTickets Create. */publicfinalclassSupportTicketsCreateSamples {
/* * 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. */publicstaticvoidcreateATicketToRequestQuotaIncreaseForDTUsForAzureSynapseAnalytics(
com.azure.resourcemanager.support.SupportManagermanager) {
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(newContactProfile().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(newQuotaTicketDetails().withQuotaChangeRequestSubType("DTUs")
.withQuotaChangeRequestVersion("1.0")
.withQuotaChangeRequests(Arrays.asList(newQuotaChangeRequest().withRegion("EastUS")
.withPayload("{\"ServerName\":\"testserver\",\"NewLimit\":54000}"))))
.create();
}
/* * 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. */publicstaticvoidcreateATicketToRequestQuotaIncreaseForActiveJobsAndJobSchedulesForABatchAccount(
com.azure.resourcemanager.support.SupportManagermanager) {
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(newContactProfile().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(newQuotaTicketDetails().withQuotaChangeRequestSubType("Account")
.withQuotaChangeRequestVersion("1.0")
.withQuotaChangeRequests(Arrays.asList(newQuotaChangeRequest().withRegion("EastUS")
.withPayload("{\"AccountName\":\"test\",\"NewLimit\":200,\"Type\":\"Jobs\"}"))))
.create();
}
/* * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/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. */publicstaticvoidcreateATicketToRequestQuotaIncreaseForLowPriorityCoresForMachineLearningService(
com.azure.resourcemanager.support.SupportManagermanager) {
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(newContactProfile().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(newQuotaTicketDetails().withQuotaChangeRequestSubType("BatchAml")
.withQuotaChangeRequestVersion("1.0")
.withQuotaChangeRequests(Arrays.asList(newQuotaChangeRequest().withRegion("EastUS")
.withPayload("{\"NewLimit\":200,\"Type\":\"LowPriority\"}"))))
.create();
}
/* * 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. */publicstaticvoidcreateATicketToRequestQuotaIncreaseForBatchAccountsForASubscription(
com.azure.resourcemanager.support.SupportManagermanager) {
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(newContactProfile().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(newQuotaTicketDetails().withQuotaChangeRequestSubType("Subscription")
.withQuotaChangeRequestVersion("1.0")
.withQuotaChangeRequests(Arrays.asList(newQuotaChangeRequest().withRegion("EastUS")
.withPayload("{\"NewLimit\":200,\"Type\":\"Account\"}"))))
.create();
}
/* * 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. */publicstaticvoidcreateATicketToRequestQuotaIncreaseForDTUsForSQLDatabase(
com.azure.resourcemanager.support.SupportManagermanager) {
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(newContactProfile().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(newQuotaTicketDetails().withQuotaChangeRequestSubType("DTUs")
.withQuotaChangeRequestVersion("1.0")
.withQuotaChangeRequests(Arrays.asList(newQuotaChangeRequest().withRegion("EastUS")
.withPayload("{\"ServerName\":\"testserver\",\"NewLimit\":54000}"))))
.create();
}
/* * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CreateGenericQuotaTicket.json *//** * Sample code: Create a ticket to request Quota increase for services that do not require additional details in the * quotaTicketDetails object. * * @param manager Entry point to SupportManager. */publicstaticvoidcreateATicketToRequestQuotaIncreaseForServicesThatDoNotRequireAdditionalDetailsInTheQuotaTicketDetailsObject(
com.azure.resourcemanager.support.SupportManagermanager) {
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(newContactProfile().withFirstName("abc")
.withLastName("xyz")
.withPreferredContactMethod(PreferredContactMethod.EMAIL)
.withPrimaryEmailAddress("abc@contoso.com")
.withPreferredTimeZone("Pacific Standard Time")
.withCountry("usa")
.withPreferredSupportLanguage("en-US"))
.withTitle("my title")
.withServiceId("/providers/Microsoft.Support/services/quota_service_guid")
.create();
}
/* * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CreateBatchQuotaTicketForSpecificBatchAccountForLowPriorityCores.json *//** * Sample code: Create a ticket to request Quota increase for Low-priority cores for a Batch account. * * @param manager Entry point to SupportManager. */publicstaticvoidcreateATicketToRequestQuotaIncreaseForLowPriorityCoresForABatchAccount(
com.azure.resourcemanager.support.SupportManagermanager) {
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(newContactProfile().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(newQuotaTicketDetails().withQuotaChangeRequestSubType("Account")
.withQuotaChangeRequestVersion("1.0")
.withQuotaChangeRequests(Arrays.asList(newQuotaChangeRequest().withRegion("EastUS")
.withPayload("{\"AccountName\":\"test\",\"NewLimit\":200,\"Type\":\"LowPriority\"}"))))
.create();
}
/* * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CreateSqlManagedInstanceQuotaTicket.json *//** * Sample code: Create a ticket to request Quota increase for Azure SQL managed instance. * * @param manager Entry point to SupportManager. */publicstaticvoidcreateATicketToRequestQuotaIncreaseForAzureSQLManagedInstance(
com.azure.resourcemanager.support.SupportManagermanager) {
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(newContactProfile().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(newQuotaTicketDetails().withQuotaChangeRequestSubType("SQLMI")
.withQuotaChangeRequestVersion("1.0")
.withQuotaChangeRequests(Arrays.asList(
newQuotaChangeRequest().withRegion("EastUS")
.withPayload("{\"NewLimit\":200, \"Metadata\":null, \"Type\":\"vCore\"}"),
newQuotaChangeRequest().withRegion("EastUS")
.withPayload("{\"NewLimit\":200, \"Metadata\":null, \"Type\":\"Subnet\"}"))))
.create();
}
/* * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CreateSubMgmtSupportTicketForSubscription.json *//** * Sample code: Create a ticket for Subscription Management related issues for a subscription. * * @param manager Entry point to SupportManager. */publicstaticvoidcreateATicketForSubscriptionManagementRelatedIssuesForASubscription(
com.azure.resourcemanager.support.SupportManagermanager) {
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(newContactProfile().withFirstName("abc")
.withLastName("xyz")
.withPreferredContactMethod(PreferredContactMethod.EMAIL)
.withPrimaryEmailAddress("abc@contoso.com")
.withPreferredTimeZone("Pacific Standard Time")
.withCountry("usa")
.withPreferredSupportLanguage("en-US"))
.withTitle("my title")
.withServiceId("/providers/Microsoft.Support/services/subscription_management_service_guid")
.withSupportPlanId(
"U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=")
.withFileWorkspaceName("6f16735c-1530836f-e9970f1a-2e49-47b7-96cd-9746b83aa066")
.create();
}
/* * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CreateTechnicalSupportTicketForSubscription.json *//** * Sample code: Create a ticket for Technical issue related to a specific resource for a subscription. * * @param manager Entry point to SupportManager. */publicstaticvoidcreateATicketForTechnicalIssueRelatedToASpecificResourceForASubscription(
com.azure.resourcemanager.support.SupportManagermanager) {
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(newContactProfile().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(newTechnicalTicketDetails().withResourceId(
"/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/resourceGroups/test/providers/Microsoft.Compute/virtualMachines/testserver"))
.withSecondaryConsent(Arrays.asList(
newSecondaryConsent().withUserConsent(UserConsent.YES).withType("virtualmachinerunninglinuxservice")))
.create();
}
/* * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CreateBatchQuotaTicketForSpecificBatchAccountForPools.json *//** * Sample code: Create a ticket to request Quota increase for Pools for a Batch account. * * @param manager Entry point to SupportManager. */publicstaticvoidcreateATicketToRequestQuotaIncreaseForPoolsForABatchAccount(
com.azure.resourcemanager.support.SupportManagermanager) {
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(newContactProfile().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(newQuotaTicketDetails().withQuotaChangeRequestSubType("Account")
.withQuotaChangeRequestVersion("1.0")
.withQuotaChangeRequests(Arrays.asList(newQuotaChangeRequest().withRegion("EastUS")
.withPayload("{\"AccountName\":\"test\",\"NewLimit\":200,\"Type\":\"Pools\"}"))))
.create();
}
/* * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CreateBatchQuotaTicketForSpecificBatchAccountForDedicatedCores.json *//** * Sample code: Create a ticket to request Quota increase for specific VM family cores for a Batch account. * * @param manager Entry point to SupportManager. */publicstaticvoidcreateATicketToRequestQuotaIncreaseForSpecificVMFamilyCoresForABatchAccount(
com.azure.resourcemanager.support.SupportManagermanager) {
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(newContactProfile().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(newQuotaTicketDetails().withQuotaChangeRequestSubType("Account")
.withQuotaChangeRequestVersion("1.0")
.withQuotaChangeRequests(Arrays.asList(newQuotaChangeRequest().withRegion("EastUS")
.withPayload(
"{\"AccountName\":\"test\",\"VMFamily\":\"standardA0_A7Family\",\"NewLimit\":200,\"Type\":\"Dedicated\"}"))))
.create();
}
/* * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CreateSqlDatabaseQuotaTicketForServers.json *//** * Sample code: Create a ticket to request Quota increase for Servers for SQL Database. * * @param manager Entry point to SupportManager. */publicstaticvoidcreateATicketToRequestQuotaIncreaseForServersForSQLDatabase(
com.azure.resourcemanager.support.SupportManagermanager) {
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(newContactProfile().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(newQuotaTicketDetails().withQuotaChangeRequestSubType("Servers")
.withQuotaChangeRequestVersion("1.0")
.withQuotaChangeRequests(
Arrays.asList(newQuotaChangeRequest().withRegion("EastUS").withPayload("{\"NewLimit\":200}"))))
.create();
}
/* * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CreateBillingSupportTicketForSubscription.json *//** * Sample code: Create a ticket for Billing related issues. * * @param manager Entry point to SupportManager. */publicstaticvoidcreateATicketForBillingRelatedIssues(com.azure.resourcemanager.support.SupportManagermanager) {
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(newContactProfile().withFirstName("abc")
.withLastName("xyz")
.withPreferredContactMethod(PreferredContactMethod.EMAIL)
.withPrimaryEmailAddress("abc@contoso.com")
.withPreferredTimeZone("Pacific Standard Time")
.withCountry("usa")
.withPreferredSupportLanguage("en-US"))
.withTitle("my title")
.withServiceId("/providers/Microsoft.Support/services/billing_service_guid")
.withSupportPlanId(
"U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=")
.withFileWorkspaceName("6f16735c-1530836f-e9970f1a-2e49-47b7-96cd-9746b83aa066")
.create();
}
/* * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CreateMachineLearningQuotaTicketForDedicatedCores.json *//** * Sample code: Create a ticket to request Quota increase for specific VM family cores for Machine Learning service. * * @param manager Entry point to SupportManager. */publicstaticvoidcreateATicketToRequestQuotaIncreaseForSpecificVMFamilyCoresForMachineLearningService(
com.azure.resourcemanager.support.SupportManagermanager) {
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(newContactProfile().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(newQuotaTicketDetails().withQuotaChangeRequestSubType("BatchAml")
.withQuotaChangeRequestVersion("1.0")
.withQuotaChangeRequests(Arrays.asList(newQuotaChangeRequest().withRegion("EastUS")
.withPayload("{\"VMFamily\":\"standardA0_A7Family\",\"NewLimit\":200,\"Type\":\"Dedicated\"}"))))
.create();
}
/* * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CreateSqlDatawarehouseQuotaTicketForServers.json *//** * Sample code: Create a ticket to request Quota increase for Servers for Azure Synapse Analytics. * * @param manager Entry point to SupportManager. */publicstaticvoidcreateATicketToRequestQuotaIncreaseForServersForAzureSynapseAnalytics(
com.azure.resourcemanager.support.SupportManagermanager) {
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(newContactProfile().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(newQuotaTicketDetails().withQuotaChangeRequestSubType("Servers")
.withQuotaChangeRequestVersion("1.0")
.withQuotaChangeRequests(
Arrays.asList(newQuotaChangeRequest().withRegion("EastUS").withPayload("{\"NewLimit\":200}"))))
.create();
}
/* * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CreateCoresQuotaTicketForSubscription.json *//** * Sample code: Create a ticket to request Quota increase for Compute VM Cores. * * @param manager Entry point to SupportManager. */publicstaticvoidcreateATicketToRequestQuotaIncreaseForComputeVMCores(com.azure.resourcemanager.support.SupportManagermanager) {
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(newContactProfile().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(newQuotaTicketDetails().withQuotaChangeRequestVersion("1.0")
.withQuotaChangeRequests(Arrays.asList(newQuotaChangeRequest().withRegion("EastUS")
.withPayload("{\"SKU\":\"DSv3 Series\",\"NewLimit\":104}"))))
.create();
}
}
SupportTickets_Get
/** * Samples for SupportTickets Get. */publicfinalclassSupportTicketsGetSamples {
/* * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetSubscriptionSupportTicketDetails.json *//** * Sample code: Get details of a subscription ticket. * * @param manager Entry point to SupportManager. */publicstaticvoidgetDetailsOfASubscriptionTicket(com.azure.resourcemanager.support.SupportManagermanager) {
manager.supportTickets().getWithResponse("testticket", com.azure.core.util.Context.NONE);
}
}
SupportTickets_List
/** * Samples for SupportTickets List. */publicfinalclassSupportTicketsListSamples {
/* * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/ListSupportTicketsServiceIdEqualsForSubscription.json *//** * Sample code: List support tickets with a certain service id for a subscription. * * @param manager Entry point to SupportManager. */publicstaticvoidlistSupportTicketsWithACertainServiceIdForASubscription(
com.azure.resourcemanager.support.SupportManagermanager) {
manager.supportTickets().list(null, "ServiceId eq 'vm_windows_service_guid'", com.azure.core.util.Context.NONE);
}
/* * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/ListSupportTicketsCreatedOnOrAfterAndInOpenStateBySubscription.json *//** * Sample code: List support tickets created on or after a certain date and in open state for a subscription. * * @param manager Entry point to SupportManager. */publicstaticvoidlistSupportTicketsCreatedOnOrAfterACertainDateAndInOpenStateForASubscription(
com.azure.resourcemanager.support.SupportManagermanager) {
manager.supportTickets()
.list(null, "createdDate ge 2020-03-10T22:08:51Z and status eq 'Open'", com.azure.core.util.Context.NONE);
}
/* * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/ListSupportTicketsInUpdatingStateBySubscription.json *//** * Sample code: List support tickets in updating state for a subscription. * * @param manager Entry point to SupportManager. */publicstaticvoidlistSupportTicketsInUpdatingStateForASubscription(com.azure.resourcemanager.support.SupportManagermanager) {
manager.supportTickets().list(null, "status eq 'Updating'", com.azure.core.util.Context.NONE);
}
/* * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/ListSupportTicketsCreatedOnOrAfterAndInUpdatingStateBySubscription.json *//** * Sample code: List support tickets created on or after a certain date and in updating state for a subscription. * * @param manager Entry point to SupportManager. */publicstaticvoidlistSupportTicketsCreatedOnOrAfterACertainDateAndInUpdatingStateForASubscription(
com.azure.resourcemanager.support.SupportManagermanager) {
manager.supportTickets()
.list(null, "createdDate ge 2020-03-10T22:08:51Z and status eq 'Updating'",
com.azure.core.util.Context.NONE);
}
/* * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/ListSupportTicketsProblemClassificationIdEqualsForSubscription.json *//** * Sample code: List support tickets with a certain problem classification id for a subscription. * * @param manager Entry point to SupportManager. */publicstaticvoidlistSupportTicketsWithACertainProblemClassificationIdForASubscription(
com.azure.resourcemanager.support.SupportManagermanager) {
manager.supportTickets()
.list(null, "ProblemClassificationId eq 'compute_vm_problemClassification_guid'",
com.azure.core.util.Context.NONE);
}
/* * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/ListSupportTicketsBySubscription.json *//** * Sample code: List support tickets for a subscription. * * @param manager Entry point to SupportManager. */publicstaticvoidlistSupportTicketsForASubscription(com.azure.resourcemanager.support.SupportManagermanager) {
manager.supportTickets().list(null, null, com.azure.core.util.Context.NONE);
}
/* * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/ListSupportTicketsInOpenStateBySubscription.json *//** * Sample code: List support tickets in open state for a subscription. * * @param manager Entry point to SupportManager. */publicstaticvoidlistSupportTicketsInOpenStateForASubscription(com.azure.resourcemanager.support.SupportManagermanager) {
manager.supportTickets().list(null, "status eq 'Open'", com.azure.core.util.Context.NONE);
}
}
SupportTickets_Update
importcom.azure.resourcemanager.support.models.Consent;
importcom.azure.resourcemanager.support.models.PreferredContactMethod;
importcom.azure.resourcemanager.support.models.SeverityLevel;
importcom.azure.resourcemanager.support.models.Status;
importcom.azure.resourcemanager.support.models.SupportTicketDetails;
importcom.azure.resourcemanager.support.models.UpdateContactProfile;
importjava.util.Arrays;
/** * Samples for SupportTickets Update. */publicfinalclassSupportTicketsUpdateSamples {
/* * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/UpdateAdvancedDiagnosticConsentOfSupportTicketForSubscription.json *//** * Sample code: Update advanced diagnostic consent of a subscription support ticket. * * @param manager Entry point to SupportManager. */publicstaticvoidupdateAdvancedDiagnosticConsentOfASubscriptionSupportTicket(
com.azure.resourcemanager.support.SupportManagermanager) {
SupportTicketDetailsresource
= manager.supportTickets().getWithResponse("testticket", com.azure.core.util.Context.NONE).getValue();
resource.update().withAdvancedDiagnosticConsent(Consent.YES).apply();
}
/* * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/UpdateSeverityOfSupportTicketForSubscription.json *//** * Sample code: Update severity of a subscription support ticket. * * @param manager Entry point to SupportManager. */publicstaticvoidupdateSeverityOfASubscriptionSupportTicket(com.azure.resourcemanager.support.SupportManagermanager) {
SupportTicketDetailsresource
= manager.supportTickets().getWithResponse("testticket", com.azure.core.util.Context.NONE).getValue();
resource.update().withSeverity(SeverityLevel.CRITICAL).apply();
}
/* * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/UpdateStatusOfSupportTicketForSubscription.json *//** * Sample code: Update status of a subscription support ticket. * * @param manager Entry point to SupportManager. */publicstaticvoidupdateStatusOfASubscriptionSupportTicket(com.azure.resourcemanager.support.SupportManagermanager) {
SupportTicketDetailsresource
= manager.supportTickets().getWithResponse("testticket", com.azure.core.util.Context.NONE).getValue();
resource.update().withStatus(Status.CLOSED).apply();
}
/* * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/UpdateContactDetailsOfSupportTicketForSubscription.json *//** * Sample code: Update contact details of a subscription support ticket. * * @param manager Entry point to SupportManager. */publicstaticvoidupdateContactDetailsOfASubscriptionSupportTicket(com.azure.resourcemanager.support.SupportManagermanager) {
SupportTicketDetailsresource
= manager.supportTickets().getWithResponse("testticket", com.azure.core.util.Context.NONE).getValue();
resource.update()
.withContactDetails(newUpdateContactProfile().withFirstName("first name")
.withLastName("last name")
.withPreferredContactMethod(PreferredContactMethod.EMAIL)
.withPrimaryEmailAddress("test.name@contoso.com")
.withAdditionalEmailAddresses(Arrays.asList("tname@contoso.com", "teamtest@contoso.com"))
.withPhoneNumber("123-456-7890")
.withPreferredTimeZone("Pacific Standard Time")
.withCountry("USA")
.withPreferredSupportLanguage("en-US"))
.apply();
}
}
importcom.azure.resourcemanager.support.models.CheckNameAvailabilityInput;
importcom.azure.resourcemanager.support.models.Type;
/** * Samples for SupportTicketsNoSubscription CheckNameAvailability. */publicfinalclassSupportTicketsNoSubscriptionCheckNameAvailabilitySamples {
/* * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CheckNameAvailability.json *//** * Sample code: Checks whether name is available for SupportTicket resource. * * @param manager Entry point to SupportManager. */publicstaticvoidchecksWhetherNameIsAvailableForSupportTicketResource(com.azure.resourcemanager.support.SupportManagermanager) {
manager.supportTicketsNoSubscriptions()
.checkNameAvailabilityWithResponse(newCheckNameAvailabilityInput().withName("sampleName")
.withType(Type.MICROSOFT_SUPPORT_SUPPORT_TICKETS), com.azure.core.util.Context.NONE);
}
}
SupportTicketsNoSubscription_Create
importcom.azure.resourcemanager.support.fluent.models.SupportTicketDetailsInner;
importcom.azure.resourcemanager.support.models.Consent;
importcom.azure.resourcemanager.support.models.ContactProfile;
importcom.azure.resourcemanager.support.models.PreferredContactMethod;
importcom.azure.resourcemanager.support.models.SecondaryConsent;
importcom.azure.resourcemanager.support.models.SeverityLevel;
importcom.azure.resourcemanager.support.models.UserConsent;
importjava.util.Arrays;
/** * Samples for SupportTicketsNoSubscription Create. */publicfinalclassSupportTicketsNoSubscriptionCreateSamples {
/* * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CreateBillingSupportTicket.json *//** * Sample code: Create a ticket for Billing related issues. * * @param manager Entry point to SupportManager. */publicstaticvoidcreateATicketForBillingRelatedIssues(com.azure.resourcemanager.support.SupportManagermanager) {
manager.supportTicketsNoSubscriptions()
.create("testticket", newSupportTicketDetailsInner().withDescription("my description")
.withProblemClassificationId(
"/providers/Microsoft.Support/services/billing_service_guid/problemClassifications/billing_problemClassification_guid")
.withSeverity(SeverityLevel.MODERATE)
.withAdvancedDiagnosticConsent(Consent.NO)
.withSupportPlanId(
"U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=")
.withContactDetails(newContactProfile().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")
.withFileWorkspaceName("6f16735c-1530836f-e9970f1a-2e49-47b7-96cd-9746b83aa066"),
com.azure.core.util.Context.NONE);
}
/* * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CreateSubMgmtSupportTicket.json *//** * Sample code: Create a ticket for Subscription Management related issues. * * @param manager Entry point to SupportManager. */publicstaticvoidcreateATicketForSubscriptionManagementRelatedIssues(com.azure.resourcemanager.support.SupportManagermanager) {
manager.supportTicketsNoSubscriptions()
.create("testticket", newSupportTicketDetailsInner().withDescription("my description")
.withProblemClassificationId(
"/providers/Microsoft.Support/services/subscription_management_service_guid/problemClassifications/subscription_management_problemClassification_guid")
.withSeverity(SeverityLevel.MODERATE)
.withAdvancedDiagnosticConsent(Consent.YES)
.withSupportPlanId(
"U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=")
.withContactDetails(newContactProfile().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")
.withFileWorkspaceName("6f16735c-1530836f-e9970f1a-2e49-47b7-96cd-9746b83aa066"),
com.azure.core.util.Context.NONE);
}
/* * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CreateTechnicalSupportTicket.json *//** * Sample code: Create a ticket for Technical issue related to a specific resource. * * @param manager Entry point to SupportManager. */publicstaticvoidcreateATicketForTechnicalIssueRelatedToASpecificResource(
com.azure.resourcemanager.support.SupportManagermanager) {
manager.supportTicketsNoSubscriptions()
.create("testticket", newSupportTicketDetailsInner().withDescription("my description")
.withProblemClassificationId(
"/providers/Microsoft.Support/services/virtual_machine_running_linux_service_guid/problemClassifications/problemClassification_guid")
.withSeverity(SeverityLevel.MODERATE)
.withAdvancedDiagnosticConsent(Consent.YES)
.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=")
.withContactDetails(newContactProfile().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")
.withFileWorkspaceName("6f16735c-1530836f-e9970f1a-2e49-47b7-96cd-9746b83aa066")
.withSecondaryConsent(Arrays.asList(newSecondaryConsent().withUserConsent(UserConsent.YES)
.withType("virtualmachinerunninglinuxservice"))),
com.azure.core.util.Context.NONE);
}
}
SupportTicketsNoSubscription_Get
/** * Samples for SupportTicketsNoSubscription Get. */publicfinalclassSupportTicketsNoSubscriptionGetSamples {
/* * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetSupportTicketDetails.json *//** * Sample code: Get details of a ticket. * * @param manager Entry point to SupportManager. */publicstaticvoidgetDetailsOfATicket(com.azure.resourcemanager.support.SupportManagermanager) {
manager.supportTicketsNoSubscriptions().getWithResponse("testticket", com.azure.core.util.Context.NONE);
}
}
SupportTicketsNoSubscription_List
/** * Samples for SupportTicketsNoSubscription List. */publicfinalclassSupportTicketsNoSubscriptionListSamples {
/* * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/ListSupportTicketsCreatedOnOrAfterAndInUpdatingState.json *//** * Sample code: List support tickets created on or after a certain date and in updating state. * * @param manager Entry point to SupportManager. */publicstaticvoidlistSupportTicketsCreatedOnOrAfterACertainDateAndInUpdatingState(
com.azure.resourcemanager.support.SupportManagermanager) {
manager.supportTicketsNoSubscriptions()
.list(null, "createdDate ge 2020-03-10T22:08:51Z and status eq 'Updating'",
com.azure.core.util.Context.NONE);
}
/* * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/ListSupportTicketsInOpenState.json *//** * Sample code: List support tickets in open state. * * @param manager Entry point to SupportManager. */publicstaticvoidlistSupportTicketsInOpenState(com.azure.resourcemanager.support.SupportManagermanager) {
manager.supportTicketsNoSubscriptions().list(null, "status eq 'Open'", com.azure.core.util.Context.NONE);
}
/* * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/ListSupportTickets.json *//** * Sample code: List support tickets. * * @param manager Entry point to SupportManager. */publicstaticvoidlistSupportTickets(com.azure.resourcemanager.support.SupportManagermanager) {
manager.supportTicketsNoSubscriptions().list(null, null, com.azure.core.util.Context.NONE);
}
/* * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/ListSupportTicketsInUpdatingState.json *//** * Sample code: List support tickets in updating state. * * @param manager Entry point to SupportManager. */publicstaticvoidlistSupportTicketsInUpdatingState(com.azure.resourcemanager.support.SupportManagermanager) {
manager.supportTicketsNoSubscriptions().list(null, "status eq 'Updating'", com.azure.core.util.Context.NONE);
}
/* * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/ListSupportTicketsCreatedOnOrAfterAndInOpenState.json *//** * Sample code: List support tickets created on or after a certain date and in open state. * * @param manager Entry point to SupportManager. */publicstaticvoidlistSupportTicketsCreatedOnOrAfterACertainDateAndInOpenState(
com.azure.resourcemanager.support.SupportManagermanager) {
manager.supportTicketsNoSubscriptions()
.list(null, "createdDate ge 2020-03-10T22:08:51Z and status eq 'Open'", com.azure.core.util.Context.NONE);
}
/* * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/ListSupportTicketsServiceIdEquals.json *//** * Sample code: List support tickets with a certain service id. * * @param manager Entry point to SupportManager. */publicstaticvoidlistSupportTicketsWithACertainServiceId(com.azure.resourcemanager.support.SupportManagermanager) {
manager.supportTicketsNoSubscriptions()
.list(null, "ServiceId eq 'vm_windows_service_guid'", com.azure.core.util.Context.NONE);
}
/* * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/ListSupportTicketsProblemClassificationIdEquals.json *//** * Sample code: List support tickets with a certain problem classification id. * * @param manager Entry point to SupportManager. */publicstaticvoidlistSupportTicketsWithACertainProblemClassificationId(
com.azure.resourcemanager.support.SupportManagermanager) {
manager.supportTicketsNoSubscriptions()
.list(null, "ProblemClassificationId eq 'compute_vm_problemClassification_guid'",
com.azure.core.util.Context.NONE);
}
}
SupportTicketsNoSubscription_Update
importcom.azure.resourcemanager.support.models.Consent;
importcom.azure.resourcemanager.support.models.PreferredContactMethod;
importcom.azure.resourcemanager.support.models.SeverityLevel;
importcom.azure.resourcemanager.support.models.Status;
importcom.azure.resourcemanager.support.models.UpdateContactProfile;
importcom.azure.resourcemanager.support.models.UpdateSupportTicket;
importjava.util.Arrays;
/** * Samples for SupportTicketsNoSubscription Update. */publicfinalclassSupportTicketsNoSubscriptionUpdateSamples {
/* * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/UpdateAdvancedDiagnosticConsentOfSupportTicket.json *//** * Sample code: Update advanced diagnostic consent of a support ticket. * * @param manager Entry point to SupportManager. */publicstaticvoidupdateAdvancedDiagnosticConsentOfASupportTicket(com.azure.resourcemanager.support.SupportManagermanager) {
manager.supportTicketsNoSubscriptions()
.updateWithResponse("testticket", newUpdateSupportTicket().withAdvancedDiagnosticConsent(Consent.YES),
com.azure.core.util.Context.NONE);
}
/* * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/UpdateSeverityOfSupportTicket.json *//** * Sample code: Update severity of a support ticket. * * @param manager Entry point to SupportManager. */publicstaticvoidupdateSeverityOfASupportTicket(com.azure.resourcemanager.support.SupportManagermanager) {
manager.supportTicketsNoSubscriptions()
.updateWithResponse("testticket", newUpdateSupportTicket().withSeverity(SeverityLevel.CRITICAL),
com.azure.core.util.Context.NONE);
}
/* * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/UpdateStatusOfSupportTicket.json *//** * Sample code: Update status of a support ticket. * * @param manager Entry point to SupportManager. */publicstaticvoidupdateStatusOfASupportTicket(com.azure.resourcemanager.support.SupportManagermanager) {
manager.supportTicketsNoSubscriptions()
.updateWithResponse("testticket", newUpdateSupportTicket().withStatus(Status.CLOSED),
com.azure.core.util.Context.NONE);
}
/* * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/UpdateContactDetailsOfSupportTicket.json *//** * Sample code: Update contact details of a support ticket. * * @param manager Entry point to SupportManager. */publicstaticvoidupdateContactDetailsOfASupportTicket(com.azure.resourcemanager.support.SupportManagermanager) {
manager.supportTicketsNoSubscriptions()
.updateWithResponse("testticket",
newUpdateSupportTicket().withContactDetails(newUpdateContactProfile().withFirstName("first name")
.withLastName("last name")
.withPreferredContactMethod(PreferredContactMethod.EMAIL)
.withPrimaryEmailAddress("test.name@contoso.com")
.withAdditionalEmailAddresses(Arrays.asList("tname@contoso.com", "teamtest@contoso.com"))
.withPhoneNumber("123-456-7890")
.withPreferredTimeZone("Pacific Standard Time")
.withCountry("USA")
.withPreferredSupportLanguage("en-US")),
com.azure.core.util.Context.NONE);
}
}