armsupport

package module
v1.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 22, 2024 License: MIT Imports: 15 Imported by: 3

README

Azure Support Module for Go

PkgGoDev

The armsupport module provides operations for working with Azure Support.

Source code

Getting started

Prerequisites

  • an Azure subscription
  • Go 1.18 or above (You could download and install the latest version of Go from here. It will replace the existing Go on your machine. If you want to install multiple Go versions on the same machine, you could refer this doc.)

Install the package

This project uses Go modules for versioning and dependency management.

Install the Azure Support module:

go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/support/armsupport

Authorization

When creating a client, you will need to provide a credential for authenticating with Azure Support. The azidentity module provides facilities for various ways of authenticating with Azure including client/secret, certificate, managed identity, and more.

cred, err := azidentity.NewDefaultAzureCredential(nil)

For more information on authentication, please see the documentation for azidentity at pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity.

Client Factory

Azure Support module consists of one or more clients. We provide a client factory which could be used to create any client in this module.

clientFactory, err := armsupport.NewClientFactory(<subscription ID>, cred, nil)

You can use ClientOptions in package github.com/Azure/azure-sdk-for-go/sdk/azcore/arm to set endpoint to connect with public and sovereign clouds as well as Azure Stack. For more information, please see the documentation for azcore at pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore.

options := arm.ClientOptions {
    ClientOptions: azcore.ClientOptions {
        Cloud: cloud.AzureChina,
    },
}
clientFactory, err := armsupport.NewClientFactory(<subscription ID>, cred, &options)

Clients

A client groups a set of related APIs, providing access to its functionality. Create one or more clients to access the APIs you require using client factory.

client := clientFactory.NewChatTranscriptsClient()

Fakes

The fake package contains types used for constructing in-memory fake servers used in unit tests. This allows writing tests to cover various success/error conditions without the need for connecting to a live service.

Please see https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/samples/fakes for details and examples on how to use fakes.

Provide Feedback

If you encounter bugs or have suggestions, please open an issue and assign the Support label.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information, see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChatTranscriptDetails added in v1.3.0

type ChatTranscriptDetails struct {
	// Properties of the resource.
	Properties *ChatTranscriptDetailsProperties

	// READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

ChatTranscriptDetails - Object that represents a Chat Transcript resource.

func (ChatTranscriptDetails) MarshalJSON added in v1.3.0

func (c ChatTranscriptDetails) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ChatTranscriptDetails.

func (*ChatTranscriptDetails) UnmarshalJSON added in v1.3.0

func (c *ChatTranscriptDetails) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ChatTranscriptDetails.

type ChatTranscriptDetailsProperties added in v1.3.0

type ChatTranscriptDetailsProperties struct {
	// List of chat transcript communication resources.
	Messages []*MessageProperties

	// READ-ONLY; Time in UTC (ISO 8601 format) when the chat began.
	StartTime *time.Time
}

ChatTranscriptDetailsProperties - Describes the properties of a Chat Transcript Details resource.

func (ChatTranscriptDetailsProperties) MarshalJSON added in v1.3.0

func (c ChatTranscriptDetailsProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ChatTranscriptDetailsProperties.

func (*ChatTranscriptDetailsProperties) UnmarshalJSON added in v1.3.0

func (c *ChatTranscriptDetailsProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ChatTranscriptDetailsProperties.

type ChatTranscriptsClient added in v1.3.0

type ChatTranscriptsClient struct {
	// contains filtered or unexported fields
}

ChatTranscriptsClient contains the methods for the ChatTranscripts group. Don't use this type directly, use NewChatTranscriptsClient() instead.

func NewChatTranscriptsClient added in v1.3.0

func NewChatTranscriptsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ChatTranscriptsClient, error)

NewChatTranscriptsClient creates a new instance of ChatTranscriptsClient with the specified values.

  • subscriptionID - The ID of the target subscription. The value must be an UUID.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*ChatTranscriptsClient) Get added in v1.3.0

func (client *ChatTranscriptsClient) Get(ctx context.Context, supportTicketName string, chatTranscriptName string, options *ChatTranscriptsClientGetOptions) (ChatTranscriptsClientGetResponse, error)

Get - Returns chatTranscript details for a support ticket under a subscription. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-04-01

  • supportTicketName - Support ticket name.
  • chatTranscriptName - ChatTranscript name.
  • options - ChatTranscriptsClientGetOptions contains the optional parameters for the ChatTranscriptsClient.Get method.
Example

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/GetchatTranscriptDetailsForSubscriptionSupportTicket.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/support/armsupport"
)

func main() {
	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)
	}
	res, err := clientFactory.NewChatTranscriptsClient().Get(ctx, "testticket", "69586795-45e9-45b5-bd9e-c9bb237d3e44", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %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.ChatTranscriptDetails = armsupport.ChatTranscriptDetails{
	// 	Name: to.Ptr("testmessage"),
	// 	Type: to.Ptr("Microsoft.Support/chatTranscripts"),
	// 	ID: to.Ptr("/providers/Microsoft.Support/supportTickets/testticket/chatTranscripts/69586795-45e9-45b5-bd9e-c9bb237d3e44"),
	// 	Properties: &armsupport.ChatTranscriptDetailsProperties{
	// 		Messages: []*armsupport.MessageProperties{
	// 			{
	// 				Body: to.Ptr("Hi again"),
	// 				CommunicationDirection: to.Ptr(armsupport.CommunicationDirectionOutbound),
	// 				ContentType: to.Ptr(armsupport.TranscriptContentType("text")),
	// 				CreatedDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-23T20:18:19.000Z"); return t}()),
	// 				Sender: to.Ptr("support engineer 2"),
	// 			},
	// 			{
	// 				Body: to.Ptr("hello"),
	// 				CommunicationDirection: to.Ptr(armsupport.CommunicationDirectionInbound),
	// 				ContentType: to.Ptr(armsupport.TranscriptContentType("text")),
	// 				CreatedDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-23T20:19:16.000Z"); return t}()),
	// 				Sender: to.Ptr("user"),
	// 		}},
	// 	},
	// }
}
Output:

func (*ChatTranscriptsClient) NewListPager added in v1.3.0

NewListPager - Lists all chat transcripts for a support ticket under subscription

Generated from API version 2024-04-01

  • supportTicketName - Support ticket name.
  • options - ChatTranscriptsClientListOptions contains the optional parameters for the ChatTranscriptsClient.NewListPager method.
Example

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/ListChatTranscriptsForSubscriptionSupportTicket.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/support/armsupport"
)

func main() {
	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)
	}
	pager := clientFactory.NewChatTranscriptsClient().NewListPager("testticket", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.ChatTranscriptsListResult = armsupport.ChatTranscriptsListResult{
		// 	Value: []*armsupport.ChatTranscriptDetails{
		// 		{
		// 			Name: to.Ptr("55989c71-1727-4cd9-abad-ddb8770f71cd"),
		// 			Type: to.Ptr("Microsoft.Support/chatTranscripts"),
		// 			ID: to.Ptr("/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/supportTickets/2207120020000085/chatTranscripts/55989c71-1727-4cd9-abad-ddb8770f71cd"),
		// 			Properties: &armsupport.ChatTranscriptDetailsProperties{
		// 				Messages: []*armsupport.MessageProperties{
		// 					{
		// 						Body: to.Ptr("Hi"),
		// 						CommunicationDirection: to.Ptr(armsupport.CommunicationDirectionOutbound),
		// 						ContentType: to.Ptr(armsupport.TranscriptContentType("text")),
		// 						CreatedDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-24T20:18:19.000Z"); return t}()),
		// 						Sender: to.Ptr("support engineer"),
		// 					},
		// 					{
		// 						Body: to.Ptr("hi"),
		// 						CommunicationDirection: to.Ptr(armsupport.CommunicationDirectionInbound),
		// 						ContentType: to.Ptr(armsupport.TranscriptContentType("text")),
		// 						CreatedDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-24T20:19:16.000Z"); return t}()),
		// 						Sender: to.Ptr("user"),
		// 				}},
		// 				StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-22T22:46:35.000Z"); return t}()),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("f15051e3-a2f2-489f-9e64-8cfa203f44f8"),
		// 			Type: to.Ptr("Microsoft.Support/chatTranscripts"),
		// 			ID: to.Ptr("/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/supportTickets/2207120020000085/chatTranscripts/f15051e3-a2f2-489f-9e64-8cfa203f44f8"),
		// 			Properties: &armsupport.ChatTranscriptDetailsProperties{
		// 				Messages: []*armsupport.MessageProperties{
		// 					{
		// 						Body: to.Ptr("Hi again"),
		// 						CommunicationDirection: to.Ptr(armsupport.CommunicationDirectionOutbound),
		// 						ContentType: to.Ptr(armsupport.TranscriptContentType("text")),
		// 						CreatedDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-25T20:18:19.000Z"); return t}()),
		// 						Sender: to.Ptr("support engineer 2"),
		// 					},
		// 					{
		// 						Body: to.Ptr("hello"),
		// 						CommunicationDirection: to.Ptr(armsupport.CommunicationDirectionInbound),
		// 						ContentType: to.Ptr(armsupport.TranscriptContentType("text")),
		// 						CreatedDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-25T20:19:16.000Z"); return t}()),
		// 						Sender: to.Ptr("user"),
		// 				}},
		// 				StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-22T22:46:35.000Z"); return t}()),
		// 			},
		// 	}},
		// }
	}
}
Output:

type ChatTranscriptsClientGetOptions added in v1.3.0

type ChatTranscriptsClientGetOptions struct {
}

ChatTranscriptsClientGetOptions contains the optional parameters for the ChatTranscriptsClient.Get method.

type ChatTranscriptsClientGetResponse added in v1.3.0

type ChatTranscriptsClientGetResponse struct {
	// Object that represents a Chat Transcript resource.
	ChatTranscriptDetails
}

ChatTranscriptsClientGetResponse contains the response from method ChatTranscriptsClient.Get.

type ChatTranscriptsClientListOptions added in v1.3.0

type ChatTranscriptsClientListOptions struct {
}

ChatTranscriptsClientListOptions contains the optional parameters for the ChatTranscriptsClient.NewListPager method.

type ChatTranscriptsClientListResponse added in v1.3.0

type ChatTranscriptsClientListResponse struct {
	// Collection of Chat Transcripts resources.
	ChatTranscriptsListResult
}

ChatTranscriptsClientListResponse contains the response from method ChatTranscriptsClient.NewListPager.

type ChatTranscriptsListResult added in v1.3.0

type ChatTranscriptsListResult struct {
	// The URI to fetch the next page of Chat Transcripts resources.
	NextLink *string

	// List of Chat Transcripts resources.
	Value []*ChatTranscriptDetails
}

ChatTranscriptsListResult - Collection of Chat Transcripts resources.

func (ChatTranscriptsListResult) MarshalJSON added in v1.3.0

func (c ChatTranscriptsListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ChatTranscriptsListResult.

func (*ChatTranscriptsListResult) UnmarshalJSON added in v1.3.0

func (c *ChatTranscriptsListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ChatTranscriptsListResult.

type ChatTranscriptsNoSubscriptionClient added in v1.3.0

type ChatTranscriptsNoSubscriptionClient struct {
	// contains filtered or unexported fields
}

ChatTranscriptsNoSubscriptionClient contains the methods for the ChatTranscriptsNoSubscription group. Don't use this type directly, use NewChatTranscriptsNoSubscriptionClient() instead.

func NewChatTranscriptsNoSubscriptionClient added in v1.3.0

func NewChatTranscriptsNoSubscriptionClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*ChatTranscriptsNoSubscriptionClient, error)

NewChatTranscriptsNoSubscriptionClient creates a new instance of ChatTranscriptsNoSubscriptionClient with the specified values.

  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*ChatTranscriptsNoSubscriptionClient) Get added in v1.3.0

Get - Returns chatTranscript details for a no subscription support ticket. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-04-01

  • supportTicketName - Support ticket name.
  • chatTranscriptName - ChatTranscript name.
  • options - ChatTranscriptsNoSubscriptionClientGetOptions contains the optional parameters for the ChatTranscriptsNoSubscriptionClient.Get method.
Example

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/GetchatTranscriptDetailsForSupportTicket.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/support/armsupport"
)

func main() {
	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)
	}
	res, err := clientFactory.NewChatTranscriptsNoSubscriptionClient().Get(ctx, "testticket", "b371192a-b094-4a71-b093-7246029b0a54", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %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.ChatTranscriptDetails = armsupport.ChatTranscriptDetails{
	// 	Name: to.Ptr("testmessage"),
	// 	Type: to.Ptr("Microsoft.Support/chatTranscripts"),
	// 	ID: to.Ptr("/providers/Microsoft.Support/supportTickets/testticket/chatTranscripts/b371192a-b094-4a71-b093-7246029b0a54"),
	// 	Properties: &armsupport.ChatTranscriptDetailsProperties{
	// 		Messages: []*armsupport.MessageProperties{
	// 			{
	// 				Body: to.Ptr("Hi again"),
	// 				CommunicationDirection: to.Ptr(armsupport.CommunicationDirectionOutbound),
	// 				ContentType: to.Ptr(armsupport.TranscriptContentType("text")),
	// 				CreatedDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-25T20:18:19.000Z"); return t}()),
	// 				Sender: to.Ptr("support engineer 2"),
	// 			},
	// 			{
	// 				Body: to.Ptr("hello"),
	// 				CommunicationDirection: to.Ptr(armsupport.CommunicationDirectionInbound),
	// 				ContentType: to.Ptr(armsupport.TranscriptContentType("text")),
	// 				CreatedDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-25T20:19:16.000Z"); return t}()),
	// 				Sender: to.Ptr("user"),
	// 		}},
	// 	},
	// }
}
Output:

func (*ChatTranscriptsNoSubscriptionClient) NewListPager added in v1.3.0

NewListPager - Lists all chat transcripts for a support ticket

Generated from API version 2024-04-01

  • supportTicketName - Support ticket name
  • options - ChatTranscriptsNoSubscriptionClientListOptions contains the optional parameters for the ChatTranscriptsNoSubscriptionClient.NewListPager method.
Example

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/ListChatTranscriptsForSupportTicket.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/support/armsupport"
)

func main() {
	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)
	}
	pager := clientFactory.NewChatTranscriptsNoSubscriptionClient().NewListPager("testticket", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.ChatTranscriptsListResult = armsupport.ChatTranscriptsListResult{
		// 	Value: []*armsupport.ChatTranscriptDetails{
		// 		{
		// 			Name: to.Ptr("55989c71-1727-4cd9-abad-ddb8770f71cd"),
		// 			Type: to.Ptr("Microsoft.Support/chatTranscripts"),
		// 			ID: to.Ptr("/providers/Microsoft.Support/supportTickets/2207120020000085/chatTranscripts/55989c71-1727-4cd9-abad-ddb8770f71cd"),
		// 			Properties: &armsupport.ChatTranscriptDetailsProperties{
		// 				Messages: []*armsupport.MessageProperties{
		// 					{
		// 						Body: to.Ptr("Hi"),
		// 						CommunicationDirection: to.Ptr(armsupport.CommunicationDirectionOutbound),
		// 						ContentType: to.Ptr(armsupport.TranscriptContentType("text")),
		// 						CreatedDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-24T20:18:19.000Z"); return t}()),
		// 						Sender: to.Ptr("support engineer"),
		// 					},
		// 					{
		// 						Body: to.Ptr("hi"),
		// 						CommunicationDirection: to.Ptr(armsupport.CommunicationDirectionInbound),
		// 						ContentType: to.Ptr(armsupport.TranscriptContentType("text")),
		// 						CreatedDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-24T20:19:16.000Z"); return t}()),
		// 						Sender: to.Ptr("user"),
		// 				}},
		// 				StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-22T22:46:35.000Z"); return t}()),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("f15051e3-a2f2-489f-9e64-8cfa203f44f8"),
		// 			Type: to.Ptr("Microsoft.Support/chatTranscripts"),
		// 			ID: to.Ptr("/providers/Microsoft.Support/supportTickets/2207120020000085/chatTranscripts/f15051e3-a2f2-489f-9e64-8cfa203f44f8"),
		// 			Properties: &armsupport.ChatTranscriptDetailsProperties{
		// 				Messages: []*armsupport.MessageProperties{
		// 					{
		// 						Body: to.Ptr("Hi again"),
		// 						CommunicationDirection: to.Ptr(armsupport.CommunicationDirectionOutbound),
		// 						ContentType: to.Ptr(armsupport.TranscriptContentType("text")),
		// 						CreatedDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-25T20:18:19.000Z"); return t}()),
		// 						Sender: to.Ptr("support engineer 2"),
		// 					},
		// 					{
		// 						Body: to.Ptr("hello"),
		// 						CommunicationDirection: to.Ptr(armsupport.CommunicationDirectionInbound),
		// 						ContentType: to.Ptr(armsupport.TranscriptContentType("text")),
		// 						CreatedDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-25T20:19:16.000Z"); return t}()),
		// 						Sender: to.Ptr("user"),
		// 				}},
		// 				StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-22T22:46:35.000Z"); return t}()),
		// 			},
		// 	}},
		// }
	}
}
Output:

type ChatTranscriptsNoSubscriptionClientGetOptions added in v1.3.0

type ChatTranscriptsNoSubscriptionClientGetOptions struct {
}

ChatTranscriptsNoSubscriptionClientGetOptions contains the optional parameters for the ChatTranscriptsNoSubscriptionClient.Get method.

type ChatTranscriptsNoSubscriptionClientGetResponse added in v1.3.0

type ChatTranscriptsNoSubscriptionClientGetResponse struct {
	// Object that represents a Chat Transcript resource.
	ChatTranscriptDetails
}

ChatTranscriptsNoSubscriptionClientGetResponse contains the response from method ChatTranscriptsNoSubscriptionClient.Get.

type ChatTranscriptsNoSubscriptionClientListOptions added in v1.3.0

type ChatTranscriptsNoSubscriptionClientListOptions struct {
}

ChatTranscriptsNoSubscriptionClientListOptions contains the optional parameters for the ChatTranscriptsNoSubscriptionClient.NewListPager method.

type ChatTranscriptsNoSubscriptionClientListResponse added in v1.3.0

type ChatTranscriptsNoSubscriptionClientListResponse struct {
	// Collection of Chat Transcripts resources.
	ChatTranscriptsListResult
}

ChatTranscriptsNoSubscriptionClientListResponse contains the response from method ChatTranscriptsNoSubscriptionClient.NewListPager.

type CheckNameAvailabilityInput

type CheckNameAvailabilityInput struct {
	// REQUIRED; The resource name to validate.
	Name *string

	// REQUIRED; The type of resource.
	Type *Type
}

CheckNameAvailabilityInput - Input of CheckNameAvailability API.

func (CheckNameAvailabilityInput) MarshalJSON added in v1.1.0

func (c CheckNameAvailabilityInput) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CheckNameAvailabilityInput.

func (*CheckNameAvailabilityInput) UnmarshalJSON added in v1.1.0

func (c *CheckNameAvailabilityInput) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CheckNameAvailabilityInput.

type CheckNameAvailabilityOutput

type CheckNameAvailabilityOutput struct {
	// READ-ONLY; The detailed error message describing why the name is not available.
	Message *string

	// READ-ONLY; Indicates whether the name is available.
	NameAvailable *bool

	// READ-ONLY; The reason why the name is not available.
	Reason *string
}

CheckNameAvailabilityOutput - Output of check name availability API.

func (CheckNameAvailabilityOutput) MarshalJSON added in v1.1.0

func (c CheckNameAvailabilityOutput) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CheckNameAvailabilityOutput.

func (*CheckNameAvailabilityOutput) UnmarshalJSON added in v1.1.0

func (c *CheckNameAvailabilityOutput) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CheckNameAvailabilityOutput.

type ClientFactory added in v1.1.0

type ClientFactory struct {
	// contains filtered or unexported fields
}

ClientFactory is a client factory used to create any client in this module. Don't use this type directly, use NewClientFactory instead.

func NewClientFactory added in v1.1.0

func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error)

NewClientFactory creates a new instance of ClientFactory with the specified values. The parameter values will be propagated to any client created from this factory.

  • subscriptionID - The ID of the target subscription. The value must be an UUID.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*ClientFactory) NewChatTranscriptsClient added in v1.3.0

func (c *ClientFactory) NewChatTranscriptsClient() *ChatTranscriptsClient

NewChatTranscriptsClient creates a new instance of ChatTranscriptsClient.

func (*ClientFactory) NewChatTranscriptsNoSubscriptionClient added in v1.3.0

func (c *ClientFactory) NewChatTranscriptsNoSubscriptionClient() *ChatTranscriptsNoSubscriptionClient

NewChatTranscriptsNoSubscriptionClient creates a new instance of ChatTranscriptsNoSubscriptionClient.

func (*ClientFactory) NewCommunicationsClient added in v1.1.0

func (c *ClientFactory) NewCommunicationsClient() *CommunicationsClient

NewCommunicationsClient creates a new instance of CommunicationsClient.

func (*ClientFactory) NewCommunicationsNoSubscriptionClient added in v1.3.0

func (c *ClientFactory) NewCommunicationsNoSubscriptionClient() *CommunicationsNoSubscriptionClient

NewCommunicationsNoSubscriptionClient creates a new instance of CommunicationsNoSubscriptionClient.

func (*ClientFactory) NewFileWorkspacesClient added in v1.3.0

func (c *ClientFactory) NewFileWorkspacesClient() *FileWorkspacesClient

NewFileWorkspacesClient creates a new instance of FileWorkspacesClient.

func (*ClientFactory) NewFileWorkspacesNoSubscriptionClient added in v1.3.0

func (c *ClientFactory) NewFileWorkspacesNoSubscriptionClient() *FileWorkspacesNoSubscriptionClient

NewFileWorkspacesNoSubscriptionClient creates a new instance of FileWorkspacesNoSubscriptionClient.

func (*ClientFactory) NewFilesClient added in v1.3.0

func (c *ClientFactory) NewFilesClient() *FilesClient

NewFilesClient creates a new instance of FilesClient.

func (*ClientFactory) NewFilesNoSubscriptionClient added in v1.3.0

func (c *ClientFactory) NewFilesNoSubscriptionClient() *FilesNoSubscriptionClient

NewFilesNoSubscriptionClient creates a new instance of FilesNoSubscriptionClient.

func (*ClientFactory) NewOperationsClient added in v1.1.0

func (c *ClientFactory) NewOperationsClient() *OperationsClient

NewOperationsClient creates a new instance of OperationsClient.

func (*ClientFactory) NewProblemClassificationsClient added in v1.1.0

func (c *ClientFactory) NewProblemClassificationsClient() *ProblemClassificationsClient

NewProblemClassificationsClient creates a new instance of ProblemClassificationsClient.

func (*ClientFactory) NewServicesClient added in v1.1.0

func (c *ClientFactory) NewServicesClient() *ServicesClient

NewServicesClient creates a new instance of ServicesClient.

func (*ClientFactory) NewTicketsClient added in v1.1.0

func (c *ClientFactory) NewTicketsClient() *TicketsClient

NewTicketsClient creates a new instance of TicketsClient.

func (*ClientFactory) NewTicketsNoSubscriptionClient added in v1.3.0

func (c *ClientFactory) NewTicketsNoSubscriptionClient() *TicketsNoSubscriptionClient

NewTicketsNoSubscriptionClient creates a new instance of TicketsNoSubscriptionClient.

type CommunicationDetails

type CommunicationDetails struct {
	// REQUIRED; Properties of the resource.
	Properties *CommunicationDetailsProperties

	// READ-ONLY; Id of the resource.
	ID *string

	// READ-ONLY; Name of the resource.
	Name *string

	// READ-ONLY; Type of the resource 'Microsoft.Support/communications'.
	Type *string
}

CommunicationDetails - Object that represents a Communication resource.

func (CommunicationDetails) MarshalJSON added in v1.1.0

func (c CommunicationDetails) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CommunicationDetails.

func (*CommunicationDetails) UnmarshalJSON added in v1.1.0

func (c *CommunicationDetails) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CommunicationDetails.

type CommunicationDetailsProperties

type CommunicationDetailsProperties struct {
	// REQUIRED; Body of the communication.
	Body *string

	// REQUIRED; Subject of the communication.
	Subject *string

	// Email address of the sender. This property is required if called by a service principal.
	Sender *string

	// READ-ONLY; Direction of communication.
	CommunicationDirection *CommunicationDirection

	// READ-ONLY; Communication type.
	CommunicationType *CommunicationType

	// READ-ONLY; Time in UTC (ISO 8601 format) when the communication was created.
	CreatedDate *time.Time
}

CommunicationDetailsProperties - Describes the properties of a communication resource.

func (CommunicationDetailsProperties) MarshalJSON

func (c CommunicationDetailsProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CommunicationDetailsProperties.

func (*CommunicationDetailsProperties) UnmarshalJSON

func (c *CommunicationDetailsProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CommunicationDetailsProperties.

type CommunicationDirection

type CommunicationDirection string

CommunicationDirection - Direction of communication.

const (
	CommunicationDirectionInbound  CommunicationDirection = "inbound"
	CommunicationDirectionOutbound CommunicationDirection = "outbound"
)

func PossibleCommunicationDirectionValues

func PossibleCommunicationDirectionValues() []CommunicationDirection

PossibleCommunicationDirectionValues returns the possible values for the CommunicationDirection const type.

type CommunicationType

type CommunicationType string

CommunicationType - Communication type.

const (
	CommunicationTypePhone CommunicationType = "phone"
	CommunicationTypeWeb   CommunicationType = "web"
)

func PossibleCommunicationTypeValues

func PossibleCommunicationTypeValues() []CommunicationType

PossibleCommunicationTypeValues returns the possible values for the CommunicationType const type.

type CommunicationsClient

type CommunicationsClient struct {
	// contains filtered or unexported fields
}

CommunicationsClient contains the methods for the Communications group. Don't use this type directly, use NewCommunicationsClient() instead.

func NewCommunicationsClient

func NewCommunicationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CommunicationsClient, error)

NewCommunicationsClient creates a new instance of CommunicationsClient with the specified values.

  • subscriptionID - The ID of the target subscription. The value must be an UUID.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*CommunicationsClient) BeginCreate

func (client *CommunicationsClient) BeginCreate(ctx context.Context, supportTicketName string, communicationName string, createCommunicationParameters CommunicationDetails, options *CommunicationsClientBeginCreateOptions) (*runtime.Poller[CommunicationsClientCreateResponse], error)

BeginCreate - Adds a new customer communication to an Azure support ticket. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-04-01

  • supportTicketName - Support ticket name.
  • communicationName - Communication name.
  • createCommunicationParameters - Communication object.
  • options - CommunicationsClientBeginCreateOptions contains the optional parameters for the CommunicationsClient.BeginCreate method.
Example

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/CreateSupportTicketCommunication.json

package main

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"
)

func main() {
	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.NewCommunicationsClient().BeginCreate(ctx, "testticket", "testcommunication", armsupport.CommunicationDetails{
		Properties: &armsupport.CommunicationDetailsProperties{
			Body:    to.Ptr("This is a test message from a customer!"),
			Sender:  to.Ptr("user@contoso.com"),
			Subject: to.Ptr("This is a test message from a customer!"),
		},
	}, 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.CommunicationDetails = armsupport.CommunicationDetails{
	// 	Name: to.Ptr("testcommunication"),
	// 	Type: to.Ptr("Microsoft.Support/communications"),
	// 	ID: to.Ptr("/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/supportTickets/testticket/communications/testcommunication"),
	// 	Properties: &armsupport.CommunicationDetailsProperties{
	// 		Body: to.Ptr("This is a test message from a customer!"),
	// 		CommunicationDirection: to.Ptr(armsupport.CommunicationDirectionOutbound),
	// 		CommunicationType: to.Ptr(armsupport.CommunicationTypeWeb),
	// 		CreatedDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-10T20:18:19.000Z"); return t}()),
	// 		Sender: to.Ptr("user@contoso.com"),
	// 		Subject: to.Ptr("This is a test message from a customer!"),
	// 	},
	// }
}
Output:

func (*CommunicationsClient) CheckNameAvailability

CheckNameAvailability - Check the availability of a resource name. This API should be used to check the uniqueness of the name for adding a new communication to the support ticket. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-04-01

  • supportTicketName - Support ticket name.
  • checkNameAvailabilityInput - Input to check.
  • options - CommunicationsClientCheckNameAvailabilityOptions contains the optional parameters for the CommunicationsClient.CheckNameAvailability method.
Example

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/CheckNameAvailabilityForSupportTicketCommunication.json

package main

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"
)

func main() {
	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)
	}
	res, err := clientFactory.NewCommunicationsClient().CheckNameAvailability(ctx, "testticket", armsupport.CheckNameAvailabilityInput{
		Name: to.Ptr("sampleName"),
		Type: to.Ptr(armsupport.TypeMicrosoftSupportCommunications),
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %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.CheckNameAvailabilityOutput = armsupport.CheckNameAvailabilityOutput{
	// 	Message: to.Ptr("Name not available"),
	// 	NameAvailable: to.Ptr(false),
	// 	Reason: to.Ptr("Name is already in use"),
	// }
}
Output:

func (*CommunicationsClient) Get

func (client *CommunicationsClient) Get(ctx context.Context, supportTicketName string, communicationName string, options *CommunicationsClientGetOptions) (CommunicationsClientGetResponse, error)

Get - Returns communication details for a support ticket. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-04-01

  • supportTicketName - Support ticket name.
  • communicationName - Communication name.
  • options - CommunicationsClientGetOptions contains the optional parameters for the CommunicationsClient.Get method.
Example

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/GetCommunicationDetailsForSubscriptionSupportTicket.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/support/armsupport"
)

func main() {
	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)
	}
	res, err := clientFactory.NewCommunicationsClient().Get(ctx, "testticket", "testmessage", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %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.CommunicationDetails = armsupport.CommunicationDetails{
	// 	Name: to.Ptr("testmessage"),
	// 	Type: to.Ptr("Microsoft.Support/communications"),
	// 	ID: to.Ptr("/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/supportTickets/testticket/communications/testmessage"),
	// 	Properties: &armsupport.CommunicationDetailsProperties{
	// 		Body: to.Ptr("this is a test message"),
	// 		CommunicationDirection: to.Ptr(armsupport.CommunicationDirectionOutbound),
	// 		CommunicationType: to.Ptr(armsupport.CommunicationTypeWeb),
	// 		CreatedDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-10T20:18:19.000Z"); return t}()),
	// 		Sender: to.Ptr("user@contoso.com"),
	// 		Subject: to.Ptr("this is a test message"),
	// 	},
	// }
}
Output:

func (*CommunicationsClient) NewListPager added in v0.4.0

NewListPager - Lists all communications (attachments not included) for a support ticket. You can also filter support ticket communications by CreatedDate or CommunicationType using the $filter parameter. The only type of communication supported today is Web. Output will be a paged result with nextLink, using which you can retrieve the next set of Communication results. Support ticket data is available for 18 months after ticket creation. If a ticket was created more than 18 months ago, a request for data might cause an error.

Generated from API version 2024-04-01

  • supportTicketName - Support ticket name.
  • options - CommunicationsClientListOptions contains the optional parameters for the CommunicationsClient.NewListPager method.
Example (ListCommunicationsForASubscriptionSupportTicket)

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/ListCommunicationsForSubscriptionSupportTicket.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/support/armsupport"
)

func main() {
	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)
	}
	pager := clientFactory.NewCommunicationsClient().NewListPager("testticket", &armsupport.CommunicationsClientListOptions{Top: nil,
		Filter: nil,
	})
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.CommunicationsListResult = armsupport.CommunicationsListResult{
		// 	Value: []*armsupport.CommunicationDetails{
		// 		{
		// 			Name: to.Ptr("testmessage1"),
		// 			Type: to.Ptr("Microsoft.Support/communications"),
		// 			ID: to.Ptr("/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/supportTickets/testticket/communications/testmessage1"),
		// 			Properties: &armsupport.CommunicationDetailsProperties{
		// 				Body: to.Ptr("this is a test message"),
		// 				CommunicationDirection: to.Ptr(armsupport.CommunicationDirectionOutbound),
		// 				CommunicationType: to.Ptr(armsupport.CommunicationTypeWeb),
		// 				CreatedDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-24T20:18:19.000Z"); return t}()),
		// 				Sender: to.Ptr("user@contoso.com"),
		// 				Subject: to.Ptr("this is a test message"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("testmessage2"),
		// 			Type: to.Ptr("Microsoft.Support/communications"),
		// 			ID: to.Ptr("/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/supportTickets/testticket/communications/testmessage2"),
		// 			Properties: &armsupport.CommunicationDetailsProperties{
		// 				Body: to.Ptr("test"),
		// 				CommunicationDirection: to.Ptr(armsupport.CommunicationDirectionOutbound),
		// 				CommunicationType: to.Ptr(armsupport.CommunicationTypeWeb),
		// 				CreatedDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-29T10:53:19.000Z"); return t}()),
		// 				Sender: to.Ptr("user@contoso.com"),
		// 				Subject: to.Ptr("test"),
		// 			},
		// 	}},
		// }
	}
}
Output:

Example (ListWebCommunicationCreatedOnOrAfterASpecificDateForASubscriptionSupportTicket)

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/ListWebCommunicationsForSubscriptionSupportTicketCreatedOnOrAfter.json

package main

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"
)

func main() {
	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)
	}
	pager := clientFactory.NewCommunicationsClient().NewListPager("testticket", &armsupport.CommunicationsClientListOptions{Top: nil,
		Filter: to.Ptr("communicationType eq 'web' and createdDate ge 2020-03-10T22:08:51Z"),
	})
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.CommunicationsListResult = armsupport.CommunicationsListResult{
		// 	Value: []*armsupport.CommunicationDetails{
		// 		{
		// 			Name: to.Ptr("testmessage1"),
		// 			Type: to.Ptr("Microsoft.Support/communications"),
		// 			ID: to.Ptr("/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/supportTickets/testticket/communications/testmessage1"),
		// 			Properties: &armsupport.CommunicationDetailsProperties{
		// 				Body: to.Ptr("this is a test message"),
		// 				CommunicationDirection: to.Ptr(armsupport.CommunicationDirectionOutbound),
		// 				CommunicationType: to.Ptr(armsupport.CommunicationTypeWeb),
		// 				CreatedDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-11T20:18:19.000Z"); return t}()),
		// 				Sender: to.Ptr("user@contoso.com"),
		// 				Subject: to.Ptr("this is a test message"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("testmessage2"),
		// 			Type: to.Ptr("Microsoft.Support/communications"),
		// 			ID: to.Ptr("/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/supportTickets/testticket/communications/testmessage2"),
		// 			Properties: &armsupport.CommunicationDetailsProperties{
		// 				Body: to.Ptr("test"),
		// 				CommunicationDirection: to.Ptr(armsupport.CommunicationDirectionOutbound),
		// 				CommunicationType: to.Ptr(armsupport.CommunicationTypeWeb),
		// 				CreatedDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-12T10:53:19.000Z"); return t}()),
		// 				Sender: to.Ptr("user@contoso.com"),
		// 				Subject: to.Ptr("test"),
		// 			},
		// 	}},
		// }
	}
}
Output:

Example (ListWebCommunicationsForASubscriptionSupportTicket)

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/ListWebCommunicationsForSubscriptionSupportTicket.json

package main

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"
)

func main() {
	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)
	}
	pager := clientFactory.NewCommunicationsClient().NewListPager("testticket", &armsupport.CommunicationsClientListOptions{Top: nil,
		Filter: to.Ptr("communicationType eq 'web'"),
	})
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.CommunicationsListResult = armsupport.CommunicationsListResult{
		// 	Value: []*armsupport.CommunicationDetails{
		// 		{
		// 			Name: to.Ptr("testmessage1"),
		// 			Type: to.Ptr("Microsoft.Support/communications"),
		// 			ID: to.Ptr("/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/supportTickets/testticket/communications/testmessage1"),
		// 			Properties: &armsupport.CommunicationDetailsProperties{
		// 				Body: to.Ptr("this is a test message"),
		// 				CommunicationDirection: to.Ptr(armsupport.CommunicationDirectionOutbound),
		// 				CommunicationType: to.Ptr(armsupport.CommunicationTypeWeb),
		// 				CreatedDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-10T20:18:19.000Z"); return t}()),
		// 				Sender: to.Ptr("user@contoso.com"),
		// 				Subject: to.Ptr("this is a test message"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("testmessage2"),
		// 			Type: to.Ptr("Microsoft.Support/communications"),
		// 			ID: to.Ptr("/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/supportTickets/testticket/communications/testmessage2"),
		// 			Properties: &armsupport.CommunicationDetailsProperties{
		// 				Body: to.Ptr("test"),
		// 				CommunicationDirection: to.Ptr(armsupport.CommunicationDirectionOutbound),
		// 				CommunicationType: to.Ptr(armsupport.CommunicationTypeWeb),
		// 				CreatedDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-11T10:53:19.000Z"); return t}()),
		// 				Sender: to.Ptr("user@contoso.com"),
		// 				Subject: to.Ptr("test"),
		// 			},
		// 	}},
		// }
	}
}
Output:

type CommunicationsClientBeginCreateOptions added in v0.2.0

type CommunicationsClientBeginCreateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

CommunicationsClientBeginCreateOptions contains the optional parameters for the CommunicationsClient.BeginCreate method.

type CommunicationsClientCheckNameAvailabilityOptions added in v0.2.0

type CommunicationsClientCheckNameAvailabilityOptions struct {
}

CommunicationsClientCheckNameAvailabilityOptions contains the optional parameters for the CommunicationsClient.CheckNameAvailability method.

type CommunicationsClientCheckNameAvailabilityResponse added in v0.2.0

type CommunicationsClientCheckNameAvailabilityResponse struct {
	// Output of check name availability API.
	CheckNameAvailabilityOutput
}

CommunicationsClientCheckNameAvailabilityResponse contains the response from method CommunicationsClient.CheckNameAvailability.

type CommunicationsClientCreateResponse added in v0.2.0

type CommunicationsClientCreateResponse struct {
	// Object that represents a Communication resource.
	CommunicationDetails
}

CommunicationsClientCreateResponse contains the response from method CommunicationsClient.BeginCreate.

type CommunicationsClientGetOptions added in v0.2.0

type CommunicationsClientGetOptions struct {
}

CommunicationsClientGetOptions contains the optional parameters for the CommunicationsClient.Get method.

type CommunicationsClientGetResponse added in v0.2.0

type CommunicationsClientGetResponse struct {
	// Object that represents a Communication resource.
	CommunicationDetails
}

CommunicationsClientGetResponse contains the response from method CommunicationsClient.Get.

type CommunicationsClientListOptions added in v0.2.0

type CommunicationsClientListOptions struct {
	// The filter to apply on the operation. You can filter by communicationType and createdDate properties. CommunicationType
	// supports Equals ('eq') operator and createdDate supports Greater Than ('gt') and
	// Greater Than or Equals ('ge') operators. You may combine the CommunicationType and CreatedDate filters by Logical And ('and')
	// operator.
	Filter *string

	// The number of values to return in the collection. Default is 10 and max is 10.
	Top *int32
}

CommunicationsClientListOptions contains the optional parameters for the CommunicationsClient.NewListPager method.

type CommunicationsClientListResponse added in v0.2.0

type CommunicationsClientListResponse struct {
	// Collection of Communication resources.
	CommunicationsListResult
}

CommunicationsClientListResponse contains the response from method CommunicationsClient.NewListPager.

type CommunicationsListResult

type CommunicationsListResult struct {
	// The URI to fetch the next page of Communication resources.
	NextLink *string

	// List of Communication resources.
	Value []*CommunicationDetails
}

CommunicationsListResult - Collection of Communication resources.

func (CommunicationsListResult) MarshalJSON

func (c CommunicationsListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CommunicationsListResult.

func (*CommunicationsListResult) UnmarshalJSON added in v1.1.0

func (c *CommunicationsListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CommunicationsListResult.

type CommunicationsNoSubscriptionClient added in v1.3.0

type CommunicationsNoSubscriptionClient struct {
	// contains filtered or unexported fields
}

CommunicationsNoSubscriptionClient contains the methods for the CommunicationsNoSubscription group. Don't use this type directly, use NewCommunicationsNoSubscriptionClient() instead.

func NewCommunicationsNoSubscriptionClient added in v1.3.0

func NewCommunicationsNoSubscriptionClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*CommunicationsNoSubscriptionClient, error)

NewCommunicationsNoSubscriptionClient creates a new instance of CommunicationsNoSubscriptionClient with the specified values.

  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*CommunicationsNoSubscriptionClient) BeginCreate added in v1.3.0

BeginCreate - Adds a new customer communication to an Azure support ticket. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-04-01

  • supportTicketName - Support ticket name.
  • communicationName - Communication name.
  • createCommunicationParameters - Communication object.
  • options - CommunicationsNoSubscriptionClientBeginCreateOptions contains the optional parameters for the CommunicationsNoSubscriptionClient.BeginCreate method.
Example

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/CreateNoSubscriptionSupportTicketCommunication.json

package main

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"
)

func main() {
	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.NewCommunicationsNoSubscriptionClient().BeginCreate(ctx, "testticket", "testcommunication", armsupport.CommunicationDetails{
		Properties: &armsupport.CommunicationDetailsProperties{
			Body:    to.Ptr("This is a test message from a customer!"),
			Sender:  to.Ptr("user@contoso.com"),
			Subject: to.Ptr("This is a test message from a customer!"),
		},
	}, 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.CommunicationDetails = armsupport.CommunicationDetails{
	// 	Name: to.Ptr("testcommunication"),
	// 	Type: to.Ptr("Microsoft.Support/communications"),
	// 	ID: to.Ptr("/providers/Microsoft.Support/supportTickets/testticket/communications/testcommunication"),
	// 	Properties: &armsupport.CommunicationDetailsProperties{
	// 		Body: to.Ptr("This is a test message from a customer!"),
	// 		CommunicationDirection: to.Ptr(armsupport.CommunicationDirectionOutbound),
	// 		CommunicationType: to.Ptr(armsupport.CommunicationTypeWeb),
	// 		CreatedDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-10T20:18:19.000Z"); return t}()),
	// 		Sender: to.Ptr("user@contoso.com"),
	// 		Subject: to.Ptr("This is a test message from a customer!"),
	// 	},
	// }
}
Output:

func (*CommunicationsNoSubscriptionClient) CheckNameAvailability added in v1.3.0

CheckNameAvailability - Check the availability of a resource name. This API should be used to check the uniqueness of the name for adding a new communication to the support ticket. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-04-01

  • supportTicketName - Support ticket name.
  • checkNameAvailabilityInput - Input to check.
  • options - CommunicationsNoSubscriptionClientCheckNameAvailabilityOptions contains the optional parameters for the CommunicationsNoSubscriptionClient.CheckNameAvailability method.
Example

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/CheckNameAvailabilityForNoSubscriptionSupportTicketCommunication.json

package main

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"
)

func main() {
	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)
	}
	res, err := clientFactory.NewCommunicationsNoSubscriptionClient().CheckNameAvailability(ctx, "testticket", armsupport.CheckNameAvailabilityInput{
		Name: to.Ptr("sampleName"),
		Type: to.Ptr(armsupport.TypeMicrosoftSupportCommunications),
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %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.CheckNameAvailabilityOutput = armsupport.CheckNameAvailabilityOutput{
	// 	Message: to.Ptr("Name not available"),
	// 	NameAvailable: to.Ptr(false),
	// 	Reason: to.Ptr("Name is already in use"),
	// }
}
Output:

func (*CommunicationsNoSubscriptionClient) Get added in v1.3.0

Get - Returns communication details for a support ticket. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-04-01

  • supportTicketName - Support ticket name.
  • communicationName - Communication name.
  • options - CommunicationsNoSubscriptionClientGetOptions contains the optional parameters for the CommunicationsNoSubscriptionClient.Get method.
Example

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/GetCommunicationDetailsForSupportTicket.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/support/armsupport"
)

func main() {
	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)
	}
	res, err := clientFactory.NewCommunicationsNoSubscriptionClient().Get(ctx, "testticket", "testmessage", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %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.CommunicationDetails = armsupport.CommunicationDetails{
	// 	Name: to.Ptr("testmessage"),
	// 	Type: to.Ptr("Microsoft.Support/communications"),
	// 	ID: to.Ptr("/providers/Microsoft.Support/supportTickets/testticket/communications/testmessage"),
	// 	Properties: &armsupport.CommunicationDetailsProperties{
	// 		Body: to.Ptr("this is a test message"),
	// 		CommunicationDirection: to.Ptr(armsupport.CommunicationDirectionOutbound),
	// 		CommunicationType: to.Ptr(armsupport.CommunicationTypeWeb),
	// 		CreatedDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-08-24T20:18:19.000Z"); return t}()),
	// 		Sender: to.Ptr("user@contoso.com"),
	// 		Subject: to.Ptr("this is a test message"),
	// 	},
	// }
}
Output:

func (*CommunicationsNoSubscriptionClient) NewListPager added in v1.3.0

NewListPager - Lists all communications (attachments not included) for a support ticket. You can also filter support ticket communications by CreatedDate or CommunicationType using the $filter parameter. The only type of communication supported today is Web. Output will be a paged result with nextLink, using which you can retrieve the next set of Communication results. Support ticket data is available for 18 months after ticket creation. If a ticket was created more than 18 months ago, a request for data might cause an error.

Generated from API version 2024-04-01

  • supportTicketName - Support ticket name
  • options - CommunicationsNoSubscriptionClientListOptions contains the optional parameters for the CommunicationsNoSubscriptionClient.NewListPager method.
Example (ListCommunicationsForANoSubscriptionSupportTicket)

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/ListCommunicationsForSupportTicket.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/support/armsupport"
)

func main() {
	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)
	}
	pager := clientFactory.NewCommunicationsNoSubscriptionClient().NewListPager("testticket", &armsupport.CommunicationsNoSubscriptionClientListOptions{Top: nil,
		Filter: nil,
	})
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.CommunicationsListResult = armsupport.CommunicationsListResult{
		// 	Value: []*armsupport.CommunicationDetails{
		// 		{
		// 			Name: to.Ptr("testmessage1"),
		// 			Type: to.Ptr("Microsoft.Support/communications"),
		// 			ID: to.Ptr("/providers/Microsoft.Support/supportTickets/testticket/communications/testmessage1"),
		// 			Properties: &armsupport.CommunicationDetailsProperties{
		// 				Body: to.Ptr("this is a test message"),
		// 				CommunicationDirection: to.Ptr(armsupport.CommunicationDirectionOutbound),
		// 				CommunicationType: to.Ptr(armsupport.CommunicationTypeWeb),
		// 				CreatedDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-24T20:18:19.000Z"); return t}()),
		// 				Sender: to.Ptr("user@contoso.com"),
		// 				Subject: to.Ptr("this is a test message"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("testmessage2"),
		// 			Type: to.Ptr("Microsoft.Support/communications"),
		// 			ID: to.Ptr("/providers/Microsoft.Support/supportTickets/testticket/communications/testmessage2"),
		// 			Properties: &armsupport.CommunicationDetailsProperties{
		// 				Body: to.Ptr("test"),
		// 				CommunicationDirection: to.Ptr(armsupport.CommunicationDirectionOutbound),
		// 				CommunicationType: to.Ptr(armsupport.CommunicationTypeWeb),
		// 				CreatedDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-29T10:53:19.000Z"); return t}()),
		// 				Sender: to.Ptr("user@contoso.com"),
		// 				Subject: to.Ptr("test"),
		// 			},
		// 	}},
		// }
	}
}
Output:

Example (ListWebCommunicationCreatedOnOrAfterASpecificDateForANoSubscriptionSupportTicket)

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/ListWebCommunicationsForSupportTicketCreatedOnOrAfter.json

package main

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"
)

func main() {
	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)
	}
	pager := clientFactory.NewCommunicationsNoSubscriptionClient().NewListPager("testticket", &armsupport.CommunicationsNoSubscriptionClientListOptions{Top: nil,
		Filter: to.Ptr("communicationType eq 'web' and createdDate ge 2020-03-10T22:08:51Z"),
	})
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.CommunicationsListResult = armsupport.CommunicationsListResult{
		// 	Value: []*armsupport.CommunicationDetails{
		// 		{
		// 			Name: to.Ptr("testmessage1"),
		// 			Type: to.Ptr("Microsoft.Support/communications"),
		// 			ID: to.Ptr("/providers/Microsoft.Support/supportTickets/testticket/communications/testmessage1"),
		// 			Properties: &armsupport.CommunicationDetailsProperties{
		// 				Body: to.Ptr("this is a test message"),
		// 				CommunicationDirection: to.Ptr(armsupport.CommunicationDirectionOutbound),
		// 				CommunicationType: to.Ptr(armsupport.CommunicationTypeWeb),
		// 				CreatedDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-11T20:18:19.000Z"); return t}()),
		// 				Sender: to.Ptr("user@contoso.com"),
		// 				Subject: to.Ptr("this is a test message"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("testmessage2"),
		// 			Type: to.Ptr("Microsoft.Support/communications"),
		// 			ID: to.Ptr("/providers/Microsoft.Support/supportTickets/testticket/communications/testmessage2"),
		// 			Properties: &armsupport.CommunicationDetailsProperties{
		// 				Body: to.Ptr("test"),
		// 				CommunicationDirection: to.Ptr(armsupport.CommunicationDirectionOutbound),
		// 				CommunicationType: to.Ptr(armsupport.CommunicationTypeWeb),
		// 				CreatedDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-12T10:53:19.000Z"); return t}()),
		// 				Sender: to.Ptr("user@contoso.com"),
		// 				Subject: to.Ptr("test"),
		// 			},
		// 	}},
		// }
	}
}
Output:

Example (ListWebCommunicationsForANoSubscriptionSupportTicket)

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/ListWebCommunicationsForSupportTicket.json

package main

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"
)

func main() {
	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)
	}
	pager := clientFactory.NewCommunicationsNoSubscriptionClient().NewListPager("testticket", &armsupport.CommunicationsNoSubscriptionClientListOptions{Top: nil,
		Filter: to.Ptr("communicationType eq 'web'"),
	})
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.CommunicationsListResult = armsupport.CommunicationsListResult{
		// 	Value: []*armsupport.CommunicationDetails{
		// 		{
		// 			Name: to.Ptr("testmessage1"),
		// 			Type: to.Ptr("Microsoft.Support/communications"),
		// 			ID: to.Ptr("/providers/Microsoft.Support/supportTickets/testticket/communications/testmessage1"),
		// 			Properties: &armsupport.CommunicationDetailsProperties{
		// 				Body: to.Ptr("this is a test message"),
		// 				CommunicationDirection: to.Ptr(armsupport.CommunicationDirectionOutbound),
		// 				CommunicationType: to.Ptr(armsupport.CommunicationTypeWeb),
		// 				CreatedDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-10T20:18:19.000Z"); return t}()),
		// 				Sender: to.Ptr("user@contoso.com"),
		// 				Subject: to.Ptr("this is a test message"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("testmessage2"),
		// 			Type: to.Ptr("Microsoft.Support/communications"),
		// 			ID: to.Ptr("/providers/Microsoft.Support/supportTickets/testticket/communications/testmessage2"),
		// 			Properties: &armsupport.CommunicationDetailsProperties{
		// 				Body: to.Ptr("test"),
		// 				CommunicationDirection: to.Ptr(armsupport.CommunicationDirectionOutbound),
		// 				CommunicationType: to.Ptr(armsupport.CommunicationTypeWeb),
		// 				CreatedDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-11T10:53:19.000Z"); return t}()),
		// 				Sender: to.Ptr("user@contoso.com"),
		// 				Subject: to.Ptr("test"),
		// 			},
		// 	}},
		// }
	}
}
Output:

type CommunicationsNoSubscriptionClientBeginCreateOptions added in v1.3.0

type CommunicationsNoSubscriptionClientBeginCreateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

CommunicationsNoSubscriptionClientBeginCreateOptions contains the optional parameters for the CommunicationsNoSubscriptionClient.BeginCreate method.

type CommunicationsNoSubscriptionClientCheckNameAvailabilityOptions added in v1.3.0

type CommunicationsNoSubscriptionClientCheckNameAvailabilityOptions struct {
}

CommunicationsNoSubscriptionClientCheckNameAvailabilityOptions contains the optional parameters for the CommunicationsNoSubscriptionClient.CheckNameAvailability method.

type CommunicationsNoSubscriptionClientCheckNameAvailabilityResponse added in v1.3.0

type CommunicationsNoSubscriptionClientCheckNameAvailabilityResponse struct {
	// Output of check name availability API.
	CheckNameAvailabilityOutput
}

CommunicationsNoSubscriptionClientCheckNameAvailabilityResponse contains the response from method CommunicationsNoSubscriptionClient.CheckNameAvailability.

type CommunicationsNoSubscriptionClientCreateResponse added in v1.3.0

type CommunicationsNoSubscriptionClientCreateResponse struct {
	// Object that represents a Communication resource.
	CommunicationDetails
}

CommunicationsNoSubscriptionClientCreateResponse contains the response from method CommunicationsNoSubscriptionClient.BeginCreate.

type CommunicationsNoSubscriptionClientGetOptions added in v1.3.0

type CommunicationsNoSubscriptionClientGetOptions struct {
}

CommunicationsNoSubscriptionClientGetOptions contains the optional parameters for the CommunicationsNoSubscriptionClient.Get method.

type CommunicationsNoSubscriptionClientGetResponse added in v1.3.0

type CommunicationsNoSubscriptionClientGetResponse struct {
	// Object that represents a Communication resource.
	CommunicationDetails
}

CommunicationsNoSubscriptionClientGetResponse contains the response from method CommunicationsNoSubscriptionClient.Get.

type CommunicationsNoSubscriptionClientListOptions added in v1.3.0

type CommunicationsNoSubscriptionClientListOptions struct {
	// The filter to apply on the operation. You can filter by communicationType and createdDate properties. CommunicationType
	// supports Equals ('eq') operator and createdDate supports Greater Than ('gt') and
	// Greater Than or Equals ('ge') operators. You may combine the CommunicationType and CreatedDate filters by Logical And ('and')
	// operator.
	Filter *string

	// The number of values to return in the collection. Default is 10 and max is 10.
	Top *int32
}

CommunicationsNoSubscriptionClientListOptions contains the optional parameters for the CommunicationsNoSubscriptionClient.NewListPager method.

type CommunicationsNoSubscriptionClientListResponse added in v1.3.0

type CommunicationsNoSubscriptionClientListResponse struct {
	// Collection of Communication resources.
	CommunicationsListResult
}

CommunicationsNoSubscriptionClientListResponse contains the response from method CommunicationsNoSubscriptionClient.NewListPager.

type Consent string

Consent - Advanced diagnostic consent to be updated on the support ticket.

const (
	ConsentNo  Consent = "No"
	ConsentYes Consent = "Yes"
)

func PossibleConsentValues added in v1.3.0

func PossibleConsentValues() []Consent

PossibleConsentValues returns the possible values for the Consent const type.

type ContactProfile

type ContactProfile struct {
	// REQUIRED; Country of the user. This is the ISO 3166-1 alpha-3 code.
	Country *string

	// REQUIRED; First name.
	FirstName *string

	// REQUIRED; Last name.
	LastName *string

	// REQUIRED; Preferred contact method.
	PreferredContactMethod *PreferredContactMethod

	// REQUIRED; Preferred language of support from Azure. Support languages vary based on the severity you choose for your support
	// ticket. Learn more at Azure Severity and responsiveness
	// [https://azure.microsoft.com/support/plans/response]. Use the standard language-country code. Valid values are 'en-us'
	// for English, 'zh-hans' for Chinese, 'es-es' for Spanish, 'fr-fr' for French,
	// 'ja-jp' for Japanese, 'ko-kr' for Korean, 'ru-ru' for Russian, 'pt-br' for Portuguese, 'it-it' for Italian, 'zh-tw' for
	// Chinese and 'de-de' for German.
	PreferredSupportLanguage *string

	// REQUIRED; Time zone of the user. This is the name of the time zone from Microsoft Time Zone Index Values [https://support.microsoft.com/help/973627/microsoft-time-zone-index-values].
	PreferredTimeZone *string

	// REQUIRED; Primary email address.
	PrimaryEmailAddress *string

	// Additional email addresses listed will be copied on any correspondence about the support ticket.
	AdditionalEmailAddresses []*string

	// Phone number. This is required if preferred contact method is phone.
	PhoneNumber *string
}

ContactProfile - Contact information associated with the support ticket.

func (ContactProfile) MarshalJSON

func (c ContactProfile) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ContactProfile.

func (*ContactProfile) UnmarshalJSON added in v1.1.0

func (c *ContactProfile) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ContactProfile.

type CreatedByType added in v1.3.0

type CreatedByType string

CreatedByType - The type of identity that created the resource.

const (
	CreatedByTypeApplication     CreatedByType = "Application"
	CreatedByTypeKey             CreatedByType = "Key"
	CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity"
	CreatedByTypeUser            CreatedByType = "User"
)

func PossibleCreatedByTypeValues added in v1.3.0

func PossibleCreatedByTypeValues() []CreatedByType

PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type.

type Engineer added in v0.2.0

type Engineer struct {
	// READ-ONLY; Email address of the Azure Support engineer assigned to the support ticket.
	EmailAddress *string
}

Engineer - Support engineer information.

func (Engineer) MarshalJSON added in v1.1.0

func (e Engineer) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Engineer.

func (*Engineer) UnmarshalJSON added in v1.1.0

func (e *Engineer) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Engineer.

type FileDetails added in v1.3.0

type FileDetails struct {
	// Properties of the resource
	Properties *FileDetailsProperties

	// READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

FileDetails - Object that represents File Details resource

func (FileDetails) MarshalJSON added in v1.3.0

func (f FileDetails) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type FileDetails.

func (*FileDetails) UnmarshalJSON added in v1.3.0

func (f *FileDetails) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type FileDetails.

type FileDetailsProperties added in v1.3.0

type FileDetailsProperties struct {
	// Size of each chunk. The size of each chunk should be provided in bytes and must not exceed 2.5 megabytes (MB).
	ChunkSize *int32

	// Size of the file to be uploaded. The file size must not exceed 5 MB and should be provided in bytes.
	FileSize *int32

	// Number of chunks to be uploaded. The maximum number of allowed chunks is 2.
	NumberOfChunks *int32

	// READ-ONLY; Time in UTC (ISO 8601 format) when file workspace was created.
	CreatedOn *time.Time
}

FileDetailsProperties - Describes the properties of a file.

func (FileDetailsProperties) MarshalJSON added in v1.3.0

func (f FileDetailsProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type FileDetailsProperties.

func (*FileDetailsProperties) UnmarshalJSON added in v1.3.0

func (f *FileDetailsProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type FileDetailsProperties.

type FileWorkspaceDetails added in v1.3.0

type FileWorkspaceDetails struct {
	// Properties of the resource
	Properties *FileWorkspaceDetailsProperties

	// READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

FileWorkspaceDetails - Object that represents FileWorkspaceDetails resource

func (FileWorkspaceDetails) MarshalJSON added in v1.3.0

func (f FileWorkspaceDetails) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type FileWorkspaceDetails.

func (*FileWorkspaceDetails) UnmarshalJSON added in v1.3.0

func (f *FileWorkspaceDetails) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type FileWorkspaceDetails.

type FileWorkspaceDetailsProperties added in v1.3.0

type FileWorkspaceDetailsProperties struct {
	// READ-ONLY; Time in UTC (ISO 8601 format) when file workspace was created.
	CreatedOn *time.Time

	// READ-ONLY; Time in UTC (ISO 8601 format) when file workspace is going to expire.
	ExpirationTime *time.Time
}

FileWorkspaceDetailsProperties - Describes the properties of a file workspace.

func (FileWorkspaceDetailsProperties) MarshalJSON added in v1.3.0

func (f FileWorkspaceDetailsProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type FileWorkspaceDetailsProperties.

func (*FileWorkspaceDetailsProperties) UnmarshalJSON added in v1.3.0

func (f *FileWorkspaceDetailsProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type FileWorkspaceDetailsProperties.

type FileWorkspacesClient added in v1.3.0

type FileWorkspacesClient struct {
	// contains filtered or unexported fields
}

FileWorkspacesClient contains the methods for the FileWorkspaces group. Don't use this type directly, use NewFileWorkspacesClient() instead.

func NewFileWorkspacesClient added in v1.3.0

func NewFileWorkspacesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*FileWorkspacesClient, error)

NewFileWorkspacesClient creates a new instance of FileWorkspacesClient with the specified values.

  • subscriptionID - The ID of the target subscription. The value must be an UUID.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*FileWorkspacesClient) Create added in v1.3.0

Create - Creates a new file workspace for the specified subscription. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-04-01

  • fileWorkspaceName - File workspace name.
  • options - FileWorkspacesClientCreateOptions contains the optional parameters for the FileWorkspacesClient.Create method.
Example

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/CreateFileWorkspaceForSubscription.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/support/armsupport"
)

func main() {
	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)
	}
	_, err = clientFactory.NewFileWorkspacesClient().Create(ctx, "testworkspace", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*FileWorkspacesClient) Get added in v1.3.0

Get - Gets details for a specific file workspace in an Azure subscription. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-04-01

  • fileWorkspaceName - File Workspace Name
  • options - FileWorkspacesClientGetOptions contains the optional parameters for the FileWorkspacesClient.Get method.
Example

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/GetFileWorkspaceDetailsForSubscription.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/support/armsupport"
)

func main() {
	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)
	}
	res, err := clientFactory.NewFileWorkspacesClient().Get(ctx, "testworkspace", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %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.FileWorkspaceDetails = armsupport.FileWorkspaceDetails{
	// 	Name: to.Ptr("testworkspace"),
	// 	Type: to.Ptr("Microsoft.Support/fileWorkspaces"),
	// 	ID: to.Ptr("/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/fileWorkspaces/testworkspace"),
	// 	Properties: &armsupport.FileWorkspaceDetailsProperties{
	// 		CreatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-08-24T20:18:19.000Z"); return t}()),
	// 		ExpirationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-08-25T20:18:19.000Z"); return t}()),
	// 	},
	// }
}
Output:

type FileWorkspacesClientCreateOptions added in v1.3.0

type FileWorkspacesClientCreateOptions struct {
}

FileWorkspacesClientCreateOptions contains the optional parameters for the FileWorkspacesClient.Create method.

type FileWorkspacesClientCreateResponse added in v1.3.0

type FileWorkspacesClientCreateResponse struct {
	// Object that represents FileWorkspaceDetails resource
	FileWorkspaceDetails
}

FileWorkspacesClientCreateResponse contains the response from method FileWorkspacesClient.Create.

type FileWorkspacesClientGetOptions added in v1.3.0

type FileWorkspacesClientGetOptions struct {
}

FileWorkspacesClientGetOptions contains the optional parameters for the FileWorkspacesClient.Get method.

type FileWorkspacesClientGetResponse added in v1.3.0

type FileWorkspacesClientGetResponse struct {
	// Object that represents FileWorkspaceDetails resource
	FileWorkspaceDetails
}

FileWorkspacesClientGetResponse contains the response from method FileWorkspacesClient.Get.

type FileWorkspacesNoSubscriptionClient added in v1.3.0

type FileWorkspacesNoSubscriptionClient struct {
	// contains filtered or unexported fields
}

FileWorkspacesNoSubscriptionClient contains the methods for the FileWorkspacesNoSubscription group. Don't use this type directly, use NewFileWorkspacesNoSubscriptionClient() instead.

func NewFileWorkspacesNoSubscriptionClient added in v1.3.0

func NewFileWorkspacesNoSubscriptionClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*FileWorkspacesNoSubscriptionClient, error)

NewFileWorkspacesNoSubscriptionClient creates a new instance of FileWorkspacesNoSubscriptionClient with the specified values.

  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*FileWorkspacesNoSubscriptionClient) Create added in v1.3.0

Create - Creates a new file workspace. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-04-01

  • fileWorkspaceName - File workspace name.
  • options - FileWorkspacesNoSubscriptionClientCreateOptions contains the optional parameters for the FileWorkspacesNoSubscriptionClient.Create method.
Example

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/CreateFileWorkspace.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/support/armsupport"
)

func main() {
	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)
	}
	_, err = clientFactory.NewFileWorkspacesNoSubscriptionClient().Create(ctx, "testworkspace", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*FileWorkspacesNoSubscriptionClient) Get added in v1.3.0

Get - Gets details for a specific file workspace. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-04-01

  • fileWorkspaceName - File Workspace Name
  • options - FileWorkspacesNoSubscriptionClientGetOptions contains the optional parameters for the FileWorkspacesNoSubscriptionClient.Get method.
Example

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/GetFileWorkspaceDetails.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/support/armsupport"
)

func main() {
	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)
	}
	res, err := clientFactory.NewFileWorkspacesNoSubscriptionClient().Get(ctx, "testworkspace", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %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.FileWorkspaceDetails = armsupport.FileWorkspaceDetails{
	// 	Name: to.Ptr("testworkspace"),
	// 	Type: to.Ptr("Microsoft.Support/fileWorkspaces"),
	// 	ID: to.Ptr("/providers/Microsoft.Support/fileWorkspaces/testworkspace"),
	// 	Properties: &armsupport.FileWorkspaceDetailsProperties{
	// 		CreatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-08-24T20:18:19.000Z"); return t}()),
	// 		ExpirationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-08-25T20:18:19.000Z"); return t}()),
	// 	},
	// }
}
Output:

type FileWorkspacesNoSubscriptionClientCreateOptions added in v1.3.0

type FileWorkspacesNoSubscriptionClientCreateOptions struct {
}

FileWorkspacesNoSubscriptionClientCreateOptions contains the optional parameters for the FileWorkspacesNoSubscriptionClient.Create method.

type FileWorkspacesNoSubscriptionClientCreateResponse added in v1.3.0

type FileWorkspacesNoSubscriptionClientCreateResponse struct {
	// Object that represents FileWorkspaceDetails resource
	FileWorkspaceDetails
}

FileWorkspacesNoSubscriptionClientCreateResponse contains the response from method FileWorkspacesNoSubscriptionClient.Create.

type FileWorkspacesNoSubscriptionClientGetOptions added in v1.3.0

type FileWorkspacesNoSubscriptionClientGetOptions struct {
}

FileWorkspacesNoSubscriptionClientGetOptions contains the optional parameters for the FileWorkspacesNoSubscriptionClient.Get method.

type FileWorkspacesNoSubscriptionClientGetResponse added in v1.3.0

type FileWorkspacesNoSubscriptionClientGetResponse struct {
	// Object that represents FileWorkspaceDetails resource
	FileWorkspaceDetails
}

FileWorkspacesNoSubscriptionClientGetResponse contains the response from method FileWorkspacesNoSubscriptionClient.Get.

type FilesClient added in v1.3.0

type FilesClient struct {
	// contains filtered or unexported fields
}

FilesClient contains the methods for the Files group. Don't use this type directly, use NewFilesClient() instead.

func NewFilesClient added in v1.3.0

func NewFilesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*FilesClient, error)

NewFilesClient creates a new instance of FilesClient with the specified values.

  • subscriptionID - The ID of the target subscription. The value must be an UUID.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*FilesClient) Create added in v1.3.0

func (client *FilesClient) Create(ctx context.Context, fileWorkspaceName string, fileName string, createFileParameters FileDetails, options *FilesClientCreateOptions) (FilesClientCreateResponse, error)

Create - Creates a new file under a workspace for the specified subscription. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-04-01

  • fileWorkspaceName - File workspace name.
  • fileName - File name.
  • createFileParameters - Create file object
  • options - FilesClientCreateOptions contains the optional parameters for the FilesClient.Create method.
Example

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/CreateFileForSubscription.json

package main

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"
)

func main() {
	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)
	}
	_, err = clientFactory.NewFilesClient().Create(ctx, "testworkspace", "test.txt", armsupport.FileDetails{
		Properties: &armsupport.FileDetailsProperties{
			ChunkSize:      to.Ptr[int32](41423),
			FileSize:       to.Ptr[int32](41423),
			NumberOfChunks: to.Ptr[int32](1),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*FilesClient) Get added in v1.3.0

func (client *FilesClient) Get(ctx context.Context, fileWorkspaceName string, fileName string, options *FilesClientGetOptions) (FilesClientGetResponse, error)

Get - Returns details of a specific file in a work space. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-04-01

  • fileWorkspaceName - File Workspace Name
  • fileName - File Name
  • options - FilesClientGetOptions contains the optional parameters for the FilesClient.Get method.
Example

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/GetFileDetailsForSubscription.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/support/armsupport"
)

func main() {
	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)
	}
	res, err := clientFactory.NewFilesClient().Get(ctx, "testworkspace", "test.txt", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %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.FileDetails = armsupport.FileDetails{
	// 	Name: to.Ptr("test.txt"),
	// 	Type: to.Ptr("Microsoft.Support/files"),
	// 	ID: to.Ptr("/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/fileWorkspaces/testworkspace/files/test.txt"),
	// 	Properties: &armsupport.FileDetailsProperties{
	// 		ChunkSize: to.Ptr[int32](41423),
	// 		CreatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-08-24T20:18:19.000Z"); return t}()),
	// 		FileSize: to.Ptr[int32](41423),
	// 		NumberOfChunks: to.Ptr[int32](1),
	// 	},
	// }
}
Output:

func (*FilesClient) NewListPager added in v1.3.0

func (client *FilesClient) NewListPager(fileWorkspaceName string, options *FilesClientListOptions) *runtime.Pager[FilesClientListResponse]

NewListPager - Lists all the Files information under a workspace for an Azure subscription.

Generated from API version 2024-04-01

  • fileWorkspaceName - File Workspace Name
  • options - FilesClientListOptions contains the optional parameters for the FilesClient.NewListPager method.
Example

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/ListFilesForSubscriptionUnderFileWorkspace.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/support/armsupport"
)

func main() {
	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)
	}
	pager := clientFactory.NewFilesClient().NewListPager("testworkspace", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.FilesListResult = armsupport.FilesListResult{
		// 	Value: []*armsupport.FileDetails{
		// 		{
		// 			Name: to.Ptr("test1.txt"),
		// 			Type: to.Ptr("Microsoft.Support/files"),
		// 			ID: to.Ptr("/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/fileWorkspaces/testworkspace/files/test1.txt"),
		// 			Properties: &armsupport.FileDetailsProperties{
		// 				ChunkSize: to.Ptr[int32](41423),
		// 				CreatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-08-24T20:18:19.000Z"); return t}()),
		// 				FileSize: to.Ptr[int32](41423),
		// 				NumberOfChunks: to.Ptr[int32](1),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("test2.txt"),
		// 			Type: to.Ptr("Microsoft.Support/files"),
		// 			ID: to.Ptr("/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/fileWorkspaces/testworkspace/files/test2.txt"),
		// 			Properties: &armsupport.FileDetailsProperties{
		// 				ChunkSize: to.Ptr[int32](41423),
		// 				CreatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-08-24T20:18:19.000Z"); return t}()),
		// 				FileSize: to.Ptr[int32](41423),
		// 				NumberOfChunks: to.Ptr[int32](1),
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*FilesClient) Upload added in v1.3.0

func (client *FilesClient) Upload(ctx context.Context, fileWorkspaceName string, fileName string, uploadFile UploadFile, options *FilesClientUploadOptions) (FilesClientUploadResponse, error)

Upload - This API allows you to upload content to a file If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-04-01

  • fileWorkspaceName - File WorkspaceName
  • fileName - File Name
  • uploadFile - UploadFile object
  • options - FilesClientUploadOptions contains the optional parameters for the FilesClient.Upload method.
Example

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/UploadFileForSubscription.json

package main

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"
)

func main() {
	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)
	}
	_, err = clientFactory.NewFilesClient().Upload(ctx, "testworkspaceName", "test.txt", armsupport.UploadFile{
		ChunkIndex: to.Ptr[int32](0),
		Content:    to.Ptr("iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABd"),
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

type FilesClientCreateOptions added in v1.3.0

type FilesClientCreateOptions struct {
}

FilesClientCreateOptions contains the optional parameters for the FilesClient.Create method.

type FilesClientCreateResponse added in v1.3.0

type FilesClientCreateResponse struct {
	// Object that represents File Details resource
	FileDetails
}

FilesClientCreateResponse contains the response from method FilesClient.Create.

type FilesClientGetOptions added in v1.3.0

type FilesClientGetOptions struct {
}

FilesClientGetOptions contains the optional parameters for the FilesClient.Get method.

type FilesClientGetResponse added in v1.3.0

type FilesClientGetResponse struct {
	// Object that represents File Details resource
	FileDetails
}

FilesClientGetResponse contains the response from method FilesClient.Get.

type FilesClientListOptions added in v1.3.0

type FilesClientListOptions struct {
}

FilesClientListOptions contains the optional parameters for the FilesClient.NewListPager method.

type FilesClientListResponse added in v1.3.0

type FilesClientListResponse struct {
	// Object that represents a collection of File resources.
	FilesListResult
}

FilesClientListResponse contains the response from method FilesClient.NewListPager.

type FilesClientUploadOptions added in v1.3.0

type FilesClientUploadOptions struct {
}

FilesClientUploadOptions contains the optional parameters for the FilesClient.Upload method.

type FilesClientUploadResponse added in v1.3.0

type FilesClientUploadResponse struct {
}

FilesClientUploadResponse contains the response from method FilesClient.Upload.

type FilesListResult added in v1.3.0

type FilesListResult struct {
	// The URI to fetch the next page of File resources.
	NextLink *string

	// List of File resources.
	Value []*FileDetails
}

FilesListResult - Object that represents a collection of File resources.

func (FilesListResult) MarshalJSON added in v1.3.0

func (f FilesListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type FilesListResult.

func (*FilesListResult) UnmarshalJSON added in v1.3.0

func (f *FilesListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type FilesListResult.

type FilesNoSubscriptionClient added in v1.3.0

type FilesNoSubscriptionClient struct {
	// contains filtered or unexported fields
}

FilesNoSubscriptionClient contains the methods for the FilesNoSubscription group. Don't use this type directly, use NewFilesNoSubscriptionClient() instead.

func NewFilesNoSubscriptionClient added in v1.3.0

func NewFilesNoSubscriptionClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*FilesNoSubscriptionClient, error)

NewFilesNoSubscriptionClient creates a new instance of FilesNoSubscriptionClient with the specified values.

  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*FilesNoSubscriptionClient) Create added in v1.3.0

func (client *FilesNoSubscriptionClient) Create(ctx context.Context, fileWorkspaceName string, fileName string, createFileParameters FileDetails, options *FilesNoSubscriptionClientCreateOptions) (FilesNoSubscriptionClientCreateResponse, error)

Create - Creates a new file under a workspace. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-04-01

  • fileWorkspaceName - File workspace name.
  • fileName - File name.
  • createFileParameters - Create file object
  • options - FilesNoSubscriptionClientCreateOptions contains the optional parameters for the FilesNoSubscriptionClient.Create method.
Example

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/CreateFile.json

package main

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"
)

func main() {
	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)
	}
	_, err = clientFactory.NewFilesNoSubscriptionClient().Create(ctx, "testworkspace", "test.txt", armsupport.FileDetails{
		Properties: &armsupport.FileDetailsProperties{
			ChunkSize:      to.Ptr[int32](41423),
			FileSize:       to.Ptr[int32](41423),
			NumberOfChunks: to.Ptr[int32](1),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*FilesNoSubscriptionClient) Get added in v1.3.0

Get - Returns details of a specific file in a work space. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-04-01

  • fileWorkspaceName - File Workspace Name
  • fileName - File Name
  • options - FilesNoSubscriptionClientGetOptions contains the optional parameters for the FilesNoSubscriptionClient.Get method.
Example

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/GetFileDetails.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/support/armsupport"
)

func main() {
	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)
	}
	res, err := clientFactory.NewFilesNoSubscriptionClient().Get(ctx, "testworkspace", "test.txt", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %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.FileDetails = armsupport.FileDetails{
	// 	Name: to.Ptr("test.txt"),
	// 	Type: to.Ptr("Microsoft.Support/files"),
	// 	ID: to.Ptr("/providers/Microsoft.Support/fileWorkspaces/testworkspace/files/test.txt"),
	// 	Properties: &armsupport.FileDetailsProperties{
	// 		ChunkSize: to.Ptr[int32](41423),
	// 		CreatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-08-24T20:18:19.000Z"); return t}()),
	// 		FileSize: to.Ptr[int32](41423),
	// 		NumberOfChunks: to.Ptr[int32](1),
	// 	},
	// }
}
Output:

func (*FilesNoSubscriptionClient) NewListPager added in v1.3.0

NewListPager - Lists all the Files information under a workspace for an Azure subscription.

Generated from API version 2024-04-01

  • fileWorkspaceName - File Workspace Name
  • options - FilesNoSubscriptionClientListOptions contains the optional parameters for the FilesNoSubscriptionClient.NewListPager method.
Example

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/ListFilesUnderFileWorkspace.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/support/armsupport"
)

func main() {
	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)
	}
	pager := clientFactory.NewFilesNoSubscriptionClient().NewListPager("testworkspace", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.FilesListResult = armsupport.FilesListResult{
		// 	Value: []*armsupport.FileDetails{
		// 		{
		// 			Name: to.Ptr("test1.txt"),
		// 			Type: to.Ptr("Microsoft.Support/files"),
		// 			ID: to.Ptr("/providers/Microsoft.Support/fileWorkspaces/testworkspace/files/test1.txt"),
		// 			Properties: &armsupport.FileDetailsProperties{
		// 				ChunkSize: to.Ptr[int32](41423),
		// 				CreatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-08-24T20:18:19.000Z"); return t}()),
		// 				FileSize: to.Ptr[int32](41423),
		// 				NumberOfChunks: to.Ptr[int32](1),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("test1.txt"),
		// 			Type: to.Ptr("Microsoft.Support/files"),
		// 			ID: to.Ptr("/providers/Microsoft.Support/fileWorkspaces/testworkspace/files/test1.txt"),
		// 			Properties: &armsupport.FileDetailsProperties{
		// 				ChunkSize: to.Ptr[int32](41423),
		// 				CreatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-08-24T20:18:19.000Z"); return t}()),
		// 				FileSize: to.Ptr[int32](41423),
		// 				NumberOfChunks: to.Ptr[int32](1),
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*FilesNoSubscriptionClient) Upload added in v1.3.0

Upload - This API allows you to upload content to a file If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-04-01

  • fileWorkspaceName - File WorkspaceName
  • fileName - File Name
  • uploadFile - UploadFile object
  • options - FilesNoSubscriptionClientUploadOptions contains the optional parameters for the FilesNoSubscriptionClient.Upload method.
Example

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/UploadFile.json

package main

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"
)

func main() {
	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)
	}
	_, err = clientFactory.NewFilesNoSubscriptionClient().Upload(ctx, "testworkspaceName", "test.txt", armsupport.UploadFile{
		ChunkIndex: to.Ptr[int32](0),
		Content:    to.Ptr("iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABd"),
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

type FilesNoSubscriptionClientCreateOptions added in v1.3.0

type FilesNoSubscriptionClientCreateOptions struct {
}

FilesNoSubscriptionClientCreateOptions contains the optional parameters for the FilesNoSubscriptionClient.Create method.

type FilesNoSubscriptionClientCreateResponse added in v1.3.0

type FilesNoSubscriptionClientCreateResponse struct {
	// Object that represents File Details resource
	FileDetails
}

FilesNoSubscriptionClientCreateResponse contains the response from method FilesNoSubscriptionClient.Create.

type FilesNoSubscriptionClientGetOptions added in v1.3.0

type FilesNoSubscriptionClientGetOptions struct {
}

FilesNoSubscriptionClientGetOptions contains the optional parameters for the FilesNoSubscriptionClient.Get method.

type FilesNoSubscriptionClientGetResponse added in v1.3.0

type FilesNoSubscriptionClientGetResponse struct {
	// Object that represents File Details resource
	FileDetails
}

FilesNoSubscriptionClientGetResponse contains the response from method FilesNoSubscriptionClient.Get.

type FilesNoSubscriptionClientListOptions added in v1.3.0

type FilesNoSubscriptionClientListOptions struct {
}

FilesNoSubscriptionClientListOptions contains the optional parameters for the FilesNoSubscriptionClient.NewListPager method.

type FilesNoSubscriptionClientListResponse added in v1.3.0

type FilesNoSubscriptionClientListResponse struct {
	// Object that represents a collection of File resources.
	FilesListResult
}

FilesNoSubscriptionClientListResponse contains the response from method FilesNoSubscriptionClient.NewListPager.

type FilesNoSubscriptionClientUploadOptions added in v1.3.0

type FilesNoSubscriptionClientUploadOptions struct {
}

FilesNoSubscriptionClientUploadOptions contains the optional parameters for the FilesNoSubscriptionClient.Upload method.

type FilesNoSubscriptionClientUploadResponse added in v1.3.0

type FilesNoSubscriptionClientUploadResponse struct {
}

FilesNoSubscriptionClientUploadResponse contains the response from method FilesNoSubscriptionClient.Upload.

type IsTemporaryTicket added in v1.3.0

type IsTemporaryTicket string

IsTemporaryTicket - This property indicates if support ticket is a temporary ticket.

const (
	IsTemporaryTicketNo  IsTemporaryTicket = "No"
	IsTemporaryTicketYes IsTemporaryTicket = "Yes"
)

func PossibleIsTemporaryTicketValues added in v1.3.0

func PossibleIsTemporaryTicketValues() []IsTemporaryTicket

PossibleIsTemporaryTicketValues returns the possible values for the IsTemporaryTicket const type.

type MessageProperties added in v1.3.0

type MessageProperties struct {
	// Body of the communication.
	Body *string

	// Name of the sender.
	Sender *string

	// READ-ONLY; Direction of communication.
	CommunicationDirection *CommunicationDirection

	// READ-ONLY; Content type.
	ContentType *TranscriptContentType

	// READ-ONLY; Time in UTC (ISO 8601 format) when the communication was created.
	CreatedDate *time.Time
}

MessageProperties - Describes the properties of a Message Details resource.

func (MessageProperties) MarshalJSON added in v1.3.0

func (m MessageProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type MessageProperties.

func (*MessageProperties) UnmarshalJSON added in v1.3.0

func (m *MessageProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type MessageProperties.

type Operation

type Operation struct {
	// The object that describes the operation.
	Display *OperationDisplay

	// READ-ONLY; Operation name: {provider}/{resource}/{operation}.
	Name *string
}

Operation - The operation supported by Microsoft Support resource provider.

func (Operation) MarshalJSON added in v1.1.0

func (o Operation) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Operation.

func (*Operation) UnmarshalJSON added in v1.1.0

func (o *Operation) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Operation.

type OperationDisplay

type OperationDisplay struct {
	// READ-ONLY; The description of the operation.
	Description *string

	// READ-ONLY; The action that users can perform, based on their permission level.
	Operation *string

	// READ-ONLY; Service provider: Microsoft Support.
	Provider *string

	// READ-ONLY; Resource on which the operation is performed.
	Resource *string
}

OperationDisplay - The object that describes the operation.

func (OperationDisplay) MarshalJSON added in v1.1.0

func (o OperationDisplay) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OperationDisplay.

func (*OperationDisplay) UnmarshalJSON added in v1.1.0

func (o *OperationDisplay) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplay.

type OperationsClient

type OperationsClient struct {
	// contains filtered or unexported fields
}

OperationsClient contains the methods for the Operations group. Don't use this type directly, use NewOperationsClient() instead.

func NewOperationsClient

func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error)

NewOperationsClient creates a new instance of OperationsClient with the specified values.

  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*OperationsClient) NewListPager added in v0.4.0

NewListPager - This lists all the available Microsoft Support REST API operations.

Generated from API version 2024-04-01

  • options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
Example

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/ListOperations.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/support/armsupport"
)

func main() {
	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)
	}
	pager := clientFactory.NewOperationsClient().NewListPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.OperationsListResult = armsupport.OperationsListResult{
		// 	Value: []*armsupport.Operation{
		// 		{
		// 			Name: to.Ptr("Microsoft.Support/services/read"),
		// 			Display: &armsupport.OperationDisplay{
		// 				Description: to.Ptr("Gets all the Azure services available for support"),
		// 				Operation: to.Ptr("Reads Services"),
		// 				Provider: to.Ptr("Microsoft Support"),
		// 				Resource: to.Ptr("Service"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Support/problemClassifications/read"),
		// 			Display: &armsupport.OperationDisplay{
		// 				Description: to.Ptr("Gets all the problem classifications available for a specific Azure service"),
		// 				Operation: to.Ptr("Reads Problem Classifications"),
		// 				Provider: to.Ptr("Microsoft Support"),
		// 				Resource: to.Ptr("Problem Classification"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Support/supportTickets/read"),
		// 			Display: &armsupport.OperationDisplay{
		// 				Description: to.Ptr("Gets all the support tickets"),
		// 				Operation: to.Ptr("Reads Support Tickets"),
		// 				Provider: to.Ptr("Microsoft Support"),
		// 				Resource: to.Ptr("Support Ticket"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Support/supportTickets/write"),
		// 			Display: &armsupport.OperationDisplay{
		// 				Description: to.Ptr("Updates support ticket"),
		// 				Operation: to.Ptr("Updates support ticket"),
		// 				Provider: to.Ptr("Microsoft Support"),
		// 				Resource: to.Ptr("Support Ticket"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Support/communications/read"),
		// 			Display: &armsupport.OperationDisplay{
		// 				Description: to.Ptr("Gets all the communications"),
		// 				Operation: to.Ptr("Reads Communications"),
		// 				Provider: to.Ptr("Microsoft Support"),
		// 				Resource: to.Ptr("Communication"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Support/communications/write"),
		// 			Display: &armsupport.OperationDisplay{
		// 				Description: to.Ptr("Creates a communication"),
		// 				Operation: to.Ptr("Creates a communication"),
		// 				Provider: to.Ptr("Microsoft Support"),
		// 				Resource: to.Ptr("Communication"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Support/register/action"),
		// 			Display: &armsupport.OperationDisplay{
		// 				Description: to.Ptr("Registers Support Resource Provider"),
		// 				Operation: to.Ptr("Registers Support Resource Provider"),
		// 				Provider: to.Ptr("Registers Support Resource Provider"),
		// 				Resource: to.Ptr("Support Registration"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Support/createSupportTicket/action"),
		// 			Display: &armsupport.OperationDisplay{
		// 				Description: to.Ptr("Creates support ticket"),
		// 				Operation: to.Ptr("Registers Support Resource Provider"),
		// 				Provider: to.Ptr("Microsoft Support"),
		// 				Resource: to.Ptr("SupportTicket"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Support/addCommunication/action"),
		// 			Display: &armsupport.OperationDisplay{
		// 				Description: to.Ptr("Add communication to support ticket"),
		// 				Operation: to.Ptr("Registers Support Resource Provider"),
		// 				Provider: to.Ptr("Microsoft Support"),
		// 				Resource: to.Ptr("Communication"),
		// 			},
		// 	}},
		// }
	}
}
Output:

type OperationsClientListOptions added in v0.2.0

type OperationsClientListOptions struct {
}

OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.

type OperationsClientListResponse added in v0.2.0

type OperationsClientListResponse struct {
	// The list of operations supported by Microsoft Support resource provider.
	OperationsListResult
}

OperationsClientListResponse contains the response from method OperationsClient.NewListPager.

type OperationsListResult

type OperationsListResult struct {
	// The list of operations supported by Microsoft Support resource provider.
	Value []*Operation
}

OperationsListResult - The list of operations supported by Microsoft Support resource provider.

func (OperationsListResult) MarshalJSON

func (o OperationsListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OperationsListResult.

func (*OperationsListResult) UnmarshalJSON added in v1.1.0

func (o *OperationsListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OperationsListResult.

type PreferredContactMethod

type PreferredContactMethod string

PreferredContactMethod - Preferred contact method.

const (
	PreferredContactMethodEmail PreferredContactMethod = "email"
	PreferredContactMethodPhone PreferredContactMethod = "phone"
)

func PossiblePreferredContactMethodValues

func PossiblePreferredContactMethodValues() []PreferredContactMethod

PossiblePreferredContactMethodValues returns the possible values for the PreferredContactMethod const type.

type ProblemClassification

type ProblemClassification struct {
	// Properties of the resource.
	Properties *ProblemClassificationProperties

	// READ-ONLY; Id of the resource.
	ID *string

	// READ-ONLY; Name of the resource.
	Name *string

	// READ-ONLY; Type of the resource 'Microsoft.Support/problemClassification'.
	Type *string
}

ProblemClassification resource object.

func (ProblemClassification) MarshalJSON added in v1.1.0

func (p ProblemClassification) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ProblemClassification.

func (*ProblemClassification) UnmarshalJSON added in v1.1.0

func (p *ProblemClassification) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ProblemClassification.

type ProblemClassificationProperties

type ProblemClassificationProperties struct {
	// Localized name of problem classification.
	DisplayName *string

	// This property indicates whether secondary consent is present for problem classification
	SecondaryConsentEnabled []*SecondaryConsentEnabled
}

ProblemClassificationProperties - Details about a problem classification available for an Azure service.

func (ProblemClassificationProperties) MarshalJSON added in v1.1.0

func (p ProblemClassificationProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ProblemClassificationProperties.

func (*ProblemClassificationProperties) UnmarshalJSON added in v1.1.0

func (p *ProblemClassificationProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ProblemClassificationProperties.

type ProblemClassificationsClient

type ProblemClassificationsClient struct {
	// contains filtered or unexported fields
}

ProblemClassificationsClient contains the methods for the ProblemClassifications group. Don't use this type directly, use NewProblemClassificationsClient() instead.

func NewProblemClassificationsClient

func NewProblemClassificationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*ProblemClassificationsClient, error)

NewProblemClassificationsClient creates a new instance of ProblemClassificationsClient with the specified values.

  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*ProblemClassificationsClient) Get

Get - Get problem classification details for a specific Azure service. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-04-01

  • serviceName - Name of the Azure service available for support.
  • problemClassificationName - Name of problem classification.
  • options - ProblemClassificationsClientGetOptions contains the optional parameters for the ProblemClassificationsClient.Get method.
Example

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/GetProblemClassification.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/support/armsupport"
)

func main() {
	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)
	}
	res, err := clientFactory.NewProblemClassificationsClient().Get(ctx, "service_guid", "problemClassification_guid", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %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.ProblemClassification = armsupport.ProblemClassification{
	// 	Name: to.Ptr("problemClassification_guid"),
	// 	Type: to.Ptr("Microsoft.Support/problemClassifications"),
	// 	ID: to.Ptr("/providers/Microsoft.Support/services/service_guid/problemClassifications/problemClassification_guid"),
	// 	Properties: &armsupport.ProblemClassificationProperties{
	// 		DisplayName: to.Ptr("Reservation Management / Exchanges and Refunds"),
	// 	},
	// }
}
Output:

func (*ProblemClassificationsClient) NewListPager added in v0.4.0

NewListPager - Lists all the problem classifications (categories) available for a specific Azure service. Always use the service and problem classifications obtained programmatically. This practice ensures that you always have the most recent set of service and problem classification Ids.

Generated from API version 2024-04-01

  • serviceName - Name of the Azure service for which the problem classifications need to be retrieved.
  • options - ProblemClassificationsClientListOptions contains the optional parameters for the ProblemClassificationsClient.NewListPager method.
Example

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/ListProblemClassifications.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/support/armsupport"
)

func main() {
	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)
	}
	pager := clientFactory.NewProblemClassificationsClient().NewListPager("service_guid", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.ProblemClassificationsListResult = armsupport.ProblemClassificationsListResult{
		// 	Value: []*armsupport.ProblemClassification{
		// 		{
		// 			Name: to.Ptr("problemClassification_guid_1"),
		// 			Type: to.Ptr("Microsoft.Support/problemClassifications"),
		// 			ID: to.Ptr("/providers/Microsoft.Support/services/service_guid/problemClassifications/problemClassification_guid_1"),
		// 			Properties: &armsupport.ProblemClassificationProperties{
		// 				DisplayName: to.Ptr("Reservation Management / Exchanges and Refunds"),
		// 				SecondaryConsentEnabled: []*armsupport.SecondaryConsentEnabled{
		// 					{
		// 						Type: to.Ptr("DatabricksConsent"),
		// 						Description: to.Ptr("For faster resolution, allow Microsoft and Databricks to temporarily have read and write access to your Databricks workspace. We will only access to read and write to your cluster for the purpose of resolving your support issue and in conformance with Microsoft's Privacy Policy."),
		// 				}},
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("problemClassification_guid_2"),
		// 			Type: to.Ptr("Microsoft.Support/problemClassifications"),
		// 			ID: to.Ptr("/providers/Microsoft.Support/services/service_guid/problemClassifications/problemClassification_guid_2"),
		// 			Properties: &armsupport.ProblemClassificationProperties{
		// 				DisplayName: to.Ptr("Reservation Management / Request Invoices"),
		// 				SecondaryConsentEnabled: []*armsupport.SecondaryConsentEnabled{
		// 					{
		// 						Type: to.Ptr("DatabricksConsent"),
		// 						Description: to.Ptr("For faster resolution, allow Microsoft and Databricks to temporarily have read and write access to your Databricks workspace. We will only access to read and write to your cluster for the purpose of resolving your support issue and in conformance with Microsoft's Privacy Policy."),
		// 				}},
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("problemClassification_guid_3"),
		// 			Type: to.Ptr("Microsoft.Support/problemClassifications"),
		// 			ID: to.Ptr("/providers/Microsoft.Support/services/service_guid/problemClassifications/problemClassification_guid_3"),
		// 			Properties: &armsupport.ProblemClassificationProperties{
		// 				DisplayName: to.Ptr("Reservation Management / Other Iissues or Requests"),
		// 				SecondaryConsentEnabled: []*armsupport.SecondaryConsentEnabled{
		// 					{
		// 						Type: to.Ptr("DatabricksConsent"),
		// 						Description: to.Ptr("For faster resolution, allow Microsoft and Databricks to temporarily have read and write access to your Databricks workspace. We will only access to read and write to your cluster for the purpose of resolving your support issue and in conformance with Microsoft's Privacy Policy."),
		// 				}},
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("problemClassification_guid_4"),
		// 			Type: to.Ptr("Microsoft.Support/problemClassifications"),
		// 			ID: to.Ptr("/providers/Microsoft.Support/services/service_guid/problemClassifications/problemClassification_guid_4"),
		// 			Properties: &armsupport.ProblemClassificationProperties{
		// 				DisplayName: to.Ptr("Other General Billing Questions"),
		// 				SecondaryConsentEnabled: []*armsupport.SecondaryConsentEnabled{
		// 					{
		// 						Type: to.Ptr("DatabricksConsent"),
		// 						Description: to.Ptr("For faster resolution, allow Microsoft and Databricks to temporarily have read and write access to your Databricks workspace. We will only access to read and write to your cluster for the purpose of resolving your support issue and in conformance with Microsoft's Privacy Policy."),
		// 				}},
		// 			},
		// 	}},
		// }
	}
}
Output:

type ProblemClassificationsClientGetOptions added in v0.2.0

type ProblemClassificationsClientGetOptions struct {
}

ProblemClassificationsClientGetOptions contains the optional parameters for the ProblemClassificationsClient.Get method.

type ProblemClassificationsClientGetResponse added in v0.2.0

type ProblemClassificationsClientGetResponse struct {
	// ProblemClassification resource object.
	ProblemClassification
}

ProblemClassificationsClientGetResponse contains the response from method ProblemClassificationsClient.Get.

type ProblemClassificationsClientListOptions added in v0.2.0

type ProblemClassificationsClientListOptions struct {
}

ProblemClassificationsClientListOptions contains the optional parameters for the ProblemClassificationsClient.NewListPager method.

type ProblemClassificationsClientListResponse added in v0.2.0

type ProblemClassificationsClientListResponse struct {
	// Collection of ProblemClassification resources.
	ProblemClassificationsListResult
}

ProblemClassificationsClientListResponse contains the response from method ProblemClassificationsClient.NewListPager.

type ProblemClassificationsListResult

type ProblemClassificationsListResult struct {
	// List of ProblemClassification resources.
	Value []*ProblemClassification
}

ProblemClassificationsListResult - Collection of ProblemClassification resources.

func (ProblemClassificationsListResult) MarshalJSON

func (p ProblemClassificationsListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ProblemClassificationsListResult.

func (*ProblemClassificationsListResult) UnmarshalJSON added in v1.1.0

func (p *ProblemClassificationsListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ProblemClassificationsListResult.

type QuotaChangeRequest

type QuotaChangeRequest struct {
	// Payload of the quota increase request.
	Payload *string

	// Region for which the quota increase request is being made.
	Region *string
}

QuotaChangeRequest - This property is required for providing the region and new quota limits.

func (QuotaChangeRequest) MarshalJSON added in v1.1.0

func (q QuotaChangeRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type QuotaChangeRequest.

func (*QuotaChangeRequest) UnmarshalJSON added in v1.1.0

func (q *QuotaChangeRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type QuotaChangeRequest.

type QuotaTicketDetails

type QuotaTicketDetails struct {
	// Required for certain quota types when there is a sub type, such as Batch, for which you are requesting a quota increase.
	QuotaChangeRequestSubType *string

	// Quota change request version.
	QuotaChangeRequestVersion *string

	// This property is required for providing the region and new quota limits.
	QuotaChangeRequests []*QuotaChangeRequest
}

QuotaTicketDetails - Additional set of information required for quota increase support ticket for certain quota types, e.g.: Virtual machine cores. Get complete details about Quota payload support request along with examples at Support quota request [https://aka.ms/supportrpquotarequestpayload].

func (QuotaTicketDetails) MarshalJSON

func (q QuotaTicketDetails) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type QuotaTicketDetails.

func (*QuotaTicketDetails) UnmarshalJSON added in v1.1.0

func (q *QuotaTicketDetails) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type QuotaTicketDetails.

type SecondaryConsent added in v1.3.0

type SecondaryConsent struct {
	// The service name for which the secondary consent is being provided. The value needs to be retrieved from the Problem Classification
	// API response.
	Type *string

	// User consent value provided
	UserConsent *UserConsent
}

SecondaryConsent - This property indicates secondary consent for the support ticket.

func (SecondaryConsent) MarshalJSON added in v1.3.0

func (s SecondaryConsent) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SecondaryConsent.

func (*SecondaryConsent) UnmarshalJSON added in v1.3.0

func (s *SecondaryConsent) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SecondaryConsent.

type SecondaryConsentEnabled added in v1.3.0

type SecondaryConsentEnabled struct {
	// User consent description.
	Description *string

	// The Azure service for which secondary consent is needed for case creation.
	Type *string
}

SecondaryConsentEnabled - This property indicates whether secondary consent is present for problem classification.

func (SecondaryConsentEnabled) MarshalJSON added in v1.3.0

func (s SecondaryConsentEnabled) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SecondaryConsentEnabled.

func (*SecondaryConsentEnabled) UnmarshalJSON added in v1.3.0

func (s *SecondaryConsentEnabled) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SecondaryConsentEnabled.

type Service

type Service struct {
	// Properties of the resource.
	Properties *ServiceProperties

	// READ-ONLY; Id of the resource.
	ID *string

	// READ-ONLY; Name of the resource.
	Name *string

	// READ-ONLY; Type of the resource 'Microsoft.Support/services'.
	Type *string
}

Service - Object that represents a Service resource.

func (Service) MarshalJSON added in v1.1.0

func (s Service) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Service.

func (*Service) UnmarshalJSON added in v1.1.0

func (s *Service) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Service.

type ServiceLevelAgreement

type ServiceLevelAgreement struct {
	// READ-ONLY; Time in UTC (ISO 8601 format) when the service level agreement expires.
	ExpirationTime *time.Time

	// READ-ONLY; Service Level Agreement in minutes.
	SLAMinutes *int32

	// READ-ONLY; Time in UTC (ISO 8601 format) when the service level agreement starts.
	StartTime *time.Time
}

ServiceLevelAgreement - Service Level Agreement details for a support ticket.

func (ServiceLevelAgreement) MarshalJSON

func (s ServiceLevelAgreement) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ServiceLevelAgreement.

func (*ServiceLevelAgreement) UnmarshalJSON

func (s *ServiceLevelAgreement) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ServiceLevelAgreement.

type ServiceProperties

type ServiceProperties struct {
	// Localized name of the Azure service.
	DisplayName *string

	// ARM Resource types.
	ResourceTypes []*string
}

ServiceProperties - Details about an Azure service available for support ticket creation.

func (ServiceProperties) MarshalJSON

func (s ServiceProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ServiceProperties.

func (*ServiceProperties) UnmarshalJSON added in v1.1.0

func (s *ServiceProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ServiceProperties.

type ServicesClient

type ServicesClient struct {
	// contains filtered or unexported fields
}

ServicesClient contains the methods for the Services group. Don't use this type directly, use NewServicesClient() instead.

func NewServicesClient

func NewServicesClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*ServicesClient, error)

NewServicesClient creates a new instance of ServicesClient with the specified values.

  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*ServicesClient) Get

Get - Gets a specific Azure service for support ticket creation. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-04-01

  • serviceName - Name of the Azure service.
  • options - ServicesClientGetOptions contains the optional parameters for the ServicesClient.Get method.
Example

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/GetService.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/support/armsupport"
)

func main() {
	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)
	}
	res, err := clientFactory.NewServicesClient().Get(ctx, "service_guid", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %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.Service = armsupport.Service{
	// 	Name: to.Ptr("service_guid"),
	// 	Type: to.Ptr("Microsoft.Support/services"),
	// 	ID: to.Ptr("/providers/Microsoft.Support/services/service_guid"),
	// 	Properties: &armsupport.ServiceProperties{
	// 		DisplayName: to.Ptr("Virtual Machine running Windows"),
	// 		ResourceTypes: []*string{
	// 			to.Ptr("MICROSOFT.CLASSICCOMPUTE/VIRTUALMACHINES"),
	// 			to.Ptr("MICROSOFT.COMPUTE/VIRTUALMACHINES")},
	// 		},
	// 	}
}
Output:

func (*ServicesClient) NewListPager added in v0.4.0

NewListPager - Lists all the Azure services available for support ticket creation. For Technical issues, select the Service Id that maps to the Azure service/product as displayed in the Services drop-down list on the Azure portal's New support request [https://portal.azure.com/#blade/MicrosoftAzureSupport/HelpAndSupportBlade/overview] page. Always use the service and its corresponding problem classification(s) obtained programmatically for support ticket creation. This practice ensures that you always have the most recent set of service and problem classification Ids.

Generated from API version 2024-04-01

  • options - ServicesClientListOptions contains the optional parameters for the ServicesClient.NewListPager method.
Example

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/ListServices.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/support/armsupport"
)

func main() {
	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)
	}
	pager := clientFactory.NewServicesClient().NewListPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.ServicesListResult = armsupport.ServicesListResult{
		// 	Value: []*armsupport.Service{
		// 		{
		// 			Name: to.Ptr("service_guid_1"),
		// 			Type: to.Ptr("Microsoft.Support/services"),
		// 			ID: to.Ptr("/providers/Microsoft.Support/services/service_guid_1"),
		// 			Properties: &armsupport.ServiceProperties{
		// 				DisplayName: to.Ptr("Billing"),
		// 				ResourceTypes: []*string{
		// 				},
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("service_guid_2"),
		// 			Type: to.Ptr("Microsoft.Support/services"),
		// 			ID: to.Ptr("/providers/Microsoft.Support/services/service_guid_2"),
		// 			Properties: &armsupport.ServiceProperties{
		// 				DisplayName: to.Ptr("Service and subscription limits (quotas)"),
		// 				ResourceTypes: []*string{
		// 				},
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("service_guid_3"),
		// 			Type: to.Ptr("Microsoft.Support/services"),
		// 			ID: to.Ptr("/providers/Microsoft.Support/services/service_guid_3"),
		// 			Properties: &armsupport.ServiceProperties{
		// 				DisplayName: to.Ptr("Subscription management"),
		// 				ResourceTypes: []*string{
		// 				},
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("service_guid_4"),
		// 			Type: to.Ptr("Microsoft.Support/services"),
		// 			ID: to.Ptr("/providers/Microsoft.Support/services/service_guid_4"),
		// 			Properties: &armsupport.ServiceProperties{
		// 				DisplayName: to.Ptr("Data Explorer"),
		// 				ResourceTypes: []*string{
		// 					to.Ptr("MICROSOFT.KUSTO/CLUSTERS"),
		// 					to.Ptr("MICROSOFT.KUSTO/DATABASES")},
		// 				},
		// 			},
		// 			{
		// 				Name: to.Ptr("service_guid_5"),
		// 				Type: to.Ptr("Microsoft.Support/services"),
		// 				ID: to.Ptr("/providers/Microsoft.Support/services/service_guid_5"),
		// 				Properties: &armsupport.ServiceProperties{
		// 					DisplayName: to.Ptr("Virtual Machine running Windows"),
		// 					ResourceTypes: []*string{
		// 						to.Ptr("MICROSOFT.CLASSICCOMPUTE/VIRTUALMACHINES"),
		// 						to.Ptr("MICROSOFT.COMPUTE/VIRTUALMACHINES")},
		// 					},
		// 				},
		// 				{
		// 					Name: to.Ptr("service_guid_6"),
		// 					Type: to.Ptr("Microsoft.Support/services"),
		// 					ID: to.Ptr("/providers/Microsoft.Support/services/service_guid_6"),
		// 					Properties: &armsupport.ServiceProperties{
		// 						DisplayName: to.Ptr("Virtual Machine running Linux"),
		// 						ResourceTypes: []*string{
		// 							to.Ptr("MICROSOFT.CLASSICCOMPUTE/VIRTUALMACHINES"),
		// 							to.Ptr("MICROSOFT.COMPUTE/VIRTUALMACHINES")},
		// 						},
		// 					},
		// 					{
		// 						Name: to.Ptr("service_guid_7"),
		// 						Type: to.Ptr("Microsoft.Support/services"),
		// 						ID: to.Ptr("/providers/Microsoft.Support/services/service_guid_7"),
		// 						Properties: &armsupport.ServiceProperties{
		// 							DisplayName: to.Ptr("Virtual Network"),
		// 							ResourceTypes: []*string{
		// 								to.Ptr("MICROSOFT.NETWORK/VIRTUALNETWORKS"),
		// 								to.Ptr("MICROSOFT.CLASSICNETWORK/VIRTUALNETWORKS")},
		// 							},
		// 					}},
		// 				}
	}
}
Output:

type ServicesClientGetOptions added in v0.2.0

type ServicesClientGetOptions struct {
}

ServicesClientGetOptions contains the optional parameters for the ServicesClient.Get method.

type ServicesClientGetResponse added in v0.2.0

type ServicesClientGetResponse struct {
	// Object that represents a Service resource.
	Service
}

ServicesClientGetResponse contains the response from method ServicesClient.Get.

type ServicesClientListOptions added in v0.2.0

type ServicesClientListOptions struct {
}

ServicesClientListOptions contains the optional parameters for the ServicesClient.NewListPager method.

type ServicesClientListResponse added in v0.2.0

type ServicesClientListResponse struct {
	// Collection of Service resources.
	ServicesListResult
}

ServicesClientListResponse contains the response from method ServicesClient.NewListPager.

type ServicesListResult

type ServicesListResult struct {
	// List of Service resources.
	Value []*Service
}

ServicesListResult - Collection of Service resources.

func (ServicesListResult) MarshalJSON

func (s ServicesListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ServicesListResult.

func (*ServicesListResult) UnmarshalJSON added in v1.1.0

func (s *ServicesListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ServicesListResult.

type SeverityLevel

type SeverityLevel string

SeverityLevel - A value that indicates the urgency of the case, which in turn determines the response time according to the service level agreement of the technical support plan you have with Azure. Note: 'Highest critical impact', also known as the 'Emergency - Severe impact' level in the Azure portal is reserved only for our Premium customers.

const (
	SeverityLevelCritical              SeverityLevel = "critical"
	SeverityLevelHighestcriticalimpact SeverityLevel = "highestcriticalimpact"
	SeverityLevelMinimal               SeverityLevel = "minimal"
	SeverityLevelModerate              SeverityLevel = "moderate"
)

func PossibleSeverityLevelValues

func PossibleSeverityLevelValues() []SeverityLevel

PossibleSeverityLevelValues returns the possible values for the SeverityLevel const type.

type Status

type Status string

Status - Status to be updated on the ticket.

const (
	StatusClosed Status = "closed"
	StatusOpen   Status = "open"
)

func PossibleStatusValues

func PossibleStatusValues() []Status

PossibleStatusValues returns the possible values for the Status const type.

type SystemData added in v1.3.0

type SystemData struct {
	// The timestamp of resource creation (UTC).
	CreatedAt *time.Time

	// The identity that created the resource.
	CreatedBy *string

	// The type of identity that created the resource.
	CreatedByType *CreatedByType

	// The timestamp of resource last modification (UTC)
	LastModifiedAt *time.Time

	// The identity that last modified the resource.
	LastModifiedBy *string

	// The type of identity that last modified the resource.
	LastModifiedByType *CreatedByType
}

SystemData - Metadata pertaining to creation and last modification of the resource.

func (SystemData) MarshalJSON added in v1.3.0

func (s SystemData) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SystemData.

func (*SystemData) UnmarshalJSON added in v1.3.0

func (s *SystemData) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SystemData.

type TechnicalTicketDetails

type TechnicalTicketDetails struct {
	// This is the resource Id of the Azure service resource (For example: A virtual machine resource or an HDInsight resource)
	// for which the support ticket is created.
	ResourceID *string
}

TechnicalTicketDetails - Additional information for technical support ticket.

func (TechnicalTicketDetails) MarshalJSON added in v1.1.0

func (t TechnicalTicketDetails) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TechnicalTicketDetails.

func (*TechnicalTicketDetails) UnmarshalJSON added in v1.1.0

func (t *TechnicalTicketDetails) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TechnicalTicketDetails.

type TicketDetails added in v0.2.0

type TicketDetails struct {
	// REQUIRED; Properties of the resource.
	Properties *TicketDetailsProperties

	// READ-ONLY; Id of the resource.
	ID *string

	// READ-ONLY; Name of the resource.
	Name *string

	// READ-ONLY; Type of the resource 'Microsoft.Support/supportTickets'.
	Type *string
}

TicketDetails - Object that represents SupportTicketDetails resource.

func (TicketDetails) MarshalJSON added in v1.1.0

func (t TicketDetails) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TicketDetails.

func (*TicketDetails) UnmarshalJSON added in v1.1.0

func (t *TicketDetails) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TicketDetails.

type TicketDetailsProperties added in v0.2.0

type TicketDetailsProperties struct {
	// REQUIRED; Advanced diagnostic consent to be updated on the support ticket.
	AdvancedDiagnosticConsent *Consent

	// REQUIRED; Contact information of the user requesting to create a support ticket.
	ContactDetails *ContactProfile

	// REQUIRED; Detailed description of the question or issue.
	Description *string

	// REQUIRED; Each Azure service has its own set of issue categories, also known as problem classification. This parameter
	// is the unique Id for the type of problem you are experiencing.
	ProblemClassificationID *string

	// REQUIRED; This is the resource Id of the Azure service resource associated with the support ticket.
	ServiceID *string

	// REQUIRED; A value that indicates the urgency of the case, which in turn determines the response time according to the service
	// level agreement of the technical support plan you have with Azure. Note: 'Highest
	// critical impact', also known as the 'Emergency - Severe impact' level in the Azure portal is reserved only for our Premium
	// customers.
	Severity *SeverityLevel

	// REQUIRED; Title of the support ticket.
	Title *string

	// Enrollment Id associated with the support ticket.
	EnrollmentID *string

	// File workspace name.
	FileWorkspaceName *string

	// Problem scoping questions associated with the support ticket.
	ProblemScopingQuestions *string

	// Time in UTC (ISO 8601 format) when the problem started.
	ProblemStartTime *time.Time

	// Additional ticket details associated with a quota support ticket request.
	QuotaTicketDetails *QuotaTicketDetails

	// Indicates if this requires a 24x7 response from Azure.
	Require24X7Response *bool

	// This property indicates secondary consents for the support ticket
	SecondaryConsent []*SecondaryConsent

	// Service Level Agreement information for this support ticket.
	ServiceLevelAgreement *ServiceLevelAgreement

	// Information about the support engineer working on this support ticket.
	SupportEngineer *Engineer

	// Support plan id associated with the support ticket.
	SupportPlanID *string

	// System generated support ticket Id that is unique.
	SupportTicketID *string

	// Additional ticket details associated with a technical support ticket request.
	TechnicalTicketDetails *TechnicalTicketDetails

	// READ-ONLY; Time in UTC (ISO 8601 format) when the support ticket was created.
	CreatedDate *time.Time

	// READ-ONLY; This property indicates if support ticket is a temporary ticket.
	IsTemporaryTicket *IsTemporaryTicket

	// READ-ONLY; Time in UTC (ISO 8601 format) when the support ticket was last modified.
	ModifiedDate *time.Time

	// READ-ONLY; Localized name of problem classification.
	ProblemClassificationDisplayName *string

	// READ-ONLY; Localized name of the Azure service.
	ServiceDisplayName *string

	// READ-ONLY; Status of the support ticket.
	Status *string

	// READ-ONLY; Support plan type associated with the support ticket.
	SupportPlanDisplayName *string

	// READ-ONLY; Support plan type associated with the support ticket.
	SupportPlanType *string
}

TicketDetailsProperties - Describes the properties of a support ticket.

func (TicketDetailsProperties) MarshalJSON added in v0.2.0

func (t TicketDetailsProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TicketDetailsProperties.

func (*TicketDetailsProperties) UnmarshalJSON added in v0.2.0

func (t *TicketDetailsProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TicketDetailsProperties.

type TicketsClient added in v0.2.0

type TicketsClient struct {
	// contains filtered or unexported fields
}

TicketsClient contains the methods for the SupportTickets group. Don't use this type directly, use NewTicketsClient() instead.

func NewTicketsClient added in v0.2.0

func NewTicketsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*TicketsClient, error)

NewTicketsClient creates a new instance of TicketsClient with the specified values.

  • subscriptionID - The ID of the target subscription. The value must be an UUID.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*TicketsClient) BeginCreate added in v0.2.0

func (client *TicketsClient) BeginCreate(ctx context.Context, supportTicketName string, createSupportTicketParameters TicketDetails, options *TicketsClientBeginCreateOptions) (*runtime.Poller[TicketsClientCreateResponse], error)

BeginCreate - 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. Always call the Services and ProblemClassifications API to get the most recent set of services and problem categories required for support ticket creation. Adding attachments is not currently supported via the API. To add a file to an existing support ticket, visit the Manage support ticket [https://portal.azure.com/#blade/MicrosoftAzure Support/HelpAndSupportBlade/managesupportrequest] page in the Azure portal, select the support ticket, and use the file upload control to add a new file. Providing consent to share diagnostic information with Azure support is currently not supported via the API. The Azure support engineer working on your ticket will reach out to you for consent if your issue requires gathering diagnostic information from your Azure resources. Creating a support ticket for on-behalf-of: Include x-ms-authorization-auxiliary header to provide an auxiliary token as per documentation [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. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-04-01

  • supportTicketName - Support ticket name.
  • createSupportTicketParameters - Support ticket request payload.
  • options - TicketsClientBeginCreateOptions contains the optional parameters for the TicketsClient.BeginCreate method.
Example (CreateATicketForBillingRelatedIssues)

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

package main

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"
)

func main() {
	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"),
	// 	},
	// }
}
Output:

Example (CreateATicketForSubscriptionManagementRelatedIssuesForASubscription)

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

package main

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"
)

func main() {
	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"),
	// 	},
	// }
}
Output:

Example (CreateATicketForTechnicalIssueRelatedToASpecificResourceForASubscription)

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

package main

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"
)

func main() {
	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"),
	// 	},
	// }
}
Output:

Example (CreateATicketToRequestQuotaIncreaseForActiveJobsAndJobSchedulesForABatchAccount)

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

package main

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"
)

func main() {
	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"),
	// 	},
	// }
}
Output:

Example (CreateATicketToRequestQuotaIncreaseForAzureSqlManagedInstance)

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

package main

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"
)

func main() {
	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"),
	// 	},
	// }
}
Output:

Example (CreateATicketToRequestQuotaIncreaseForBatchAccountsForASubscription)

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

package main

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"
)

func main() {
	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"),
	// 	},
	// }
}
Output:

Example (CreateATicketToRequestQuotaIncreaseForComputeVmCores)

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

package main

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"
)

func main() {
	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"),
	// 	},
	// }
}
Output:

Example (CreateATicketToRequestQuotaIncreaseForDtUsForAzureSynapseAnalytics)

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

package main

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"
)

func main() {
	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"),
	// 	},
	// }
}
Output:

Example (CreateATicketToRequestQuotaIncreaseForDtUsForSqlDatabase)

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

package main

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"
)

func main() {
	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"),
	// 	},
	// }
}
Output:

Example (CreateATicketToRequestQuotaIncreaseForLowPriorityCoresForABatchAccount)

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

package main

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"
)

func main() {
	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"),
	// 	},
	// }
}
Output:

Example (CreateATicketToRequestQuotaIncreaseForLowPriorityCoresForMachineLearningService)

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

package main

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"
)

func main() {
	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"),
	// 	},
	// }
}
Output:

Example (CreateATicketToRequestQuotaIncreaseForPoolsForABatchAccount)

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

package main

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"
)

func main() {
	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"),
	// 	},
	// }
}
Output:

Example (CreateATicketToRequestQuotaIncreaseForServersForAzureSynapseAnalytics)

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

package main

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"
)

func main() {
	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"),
	// 	},
	// }
}
Output:

Example (CreateATicketToRequestQuotaIncreaseForServersForSqlDatabase)

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

package main

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"
)

func main() {
	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"),
	// 	},
	// }
}
Output:

Example (CreateATicketToRequestQuotaIncreaseForServicesThatDoNotRequireAdditionalDetailsInTheQuotaTicketDetailsObject)

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

package main

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"
)

func main() {
	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"),
	// 	},
	// }
}
Output:

Example (CreateATicketToRequestQuotaIncreaseForSpecificVmFamilyCoresForABatchAccount)

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

package main

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"
)

func main() {
	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"),
	// 	},
	// }
}
Output:

Example (CreateATicketToRequestQuotaIncreaseForSpecificVmFamilyCoresForMachineLearningService)

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

package main

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"
)

func main() {
	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"),
	// 	},
	// }
}
Output:

func (*TicketsClient) CheckNameAvailability added in v0.2.0

CheckNameAvailability - Check the availability of a resource name. This API should be used to check the uniqueness of the name for support ticket creation for the selected subscription. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-04-01

  • checkNameAvailabilityInput - Input to check.
  • options - TicketsClientCheckNameAvailabilityOptions contains the optional parameters for the TicketsClient.CheckNameAvailability method.
Example

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/CheckNameAvailabilityWithSubscription.json

package main

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"
)

func main() {
	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)
	}
	res, err := clientFactory.NewTicketsClient().CheckNameAvailability(ctx, armsupport.CheckNameAvailabilityInput{
		Name: to.Ptr("sampleName"),
		Type: to.Ptr(armsupport.TypeMicrosoftSupportSupportTickets),
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %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.CheckNameAvailabilityOutput = armsupport.CheckNameAvailabilityOutput{
	// 	Message: to.Ptr("Name not available"),
	// 	NameAvailable: to.Ptr(false),
	// 	Reason: to.Ptr("Name is already in use"),
	// }
}
Output:

func (*TicketsClient) Get added in v0.2.0

func (client *TicketsClient) Get(ctx context.Context, supportTicketName string, options *TicketsClientGetOptions) (TicketsClientGetResponse, error)

Get - Get ticket details for an Azure subscription. Support ticket data is available for 18 months after ticket creation. If a ticket was created more than 18 months ago, a request for data might cause an error. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-04-01

  • supportTicketName - Support ticket name.
  • options - TicketsClientGetOptions contains the optional parameters for the TicketsClient.Get method.
Example

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/GetSubscriptionSupportTicketDetails.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/support/armsupport"
)

func main() {
	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)
	}
	res, err := clientFactory.NewTicketsClient().Get(ctx, "testticket", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %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("This is a test - please ignore"),
	// 		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("Add or Edit VAT, TAX ID, or PO Number"),
	// 		ProblemClassificationID: to.Ptr("/providers/Microsoft.Support/services/subscription_management_service_guid/problemClassifications/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.SeverityLevelMinimal),
	// 		Status: to.Ptr("Open"),
	// 		SupportEngineer: &armsupport.Engineer{
	// 			EmailAddress: to.Ptr("xyz@contoso.com"),
	// 		},
	// 		SupportPlanDisplayName: to.Ptr("Premier"),
	// 		SupportPlanID: to.Ptr("U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw="),
	// 		SupportPlanType: to.Ptr("Premier"),
	// 		SupportTicketID: to.Ptr("118032014183770"),
	// 		Title: to.Ptr("Test - please ignore"),
	// 	},
	// }
}
Output:

func (*TicketsClient) NewListPager added in v0.4.0

NewListPager - Lists all the support tickets for an Azure subscription. You can also filter the support tickets by Status, CreatedDate, ServiceId, and ProblemClassificationId using the $filter parameter. Output will be a paged result with nextLink, using which you can retrieve the next set of support tickets. Support ticket data is available for 18 months after ticket creation. If a ticket was created more than 18 months ago, a request for data might cause an error.

Generated from API version 2024-04-01

  • options - TicketsClientListOptions contains the optional parameters for the TicketsClient.NewListPager method.
Example (ListSupportTicketsCreatedOnOrAfterACertainDateAndInOpenStateForASubscription)

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/ListSupportTicketsCreatedOnOrAfterAndInOpenStateBySubscription.json

package main

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"
)

func main() {
	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)
	}
	pager := clientFactory.NewTicketsClient().NewListPager(&armsupport.TicketsClientListOptions{Top: nil,
		Filter: to.Ptr("createdDate ge 2020-03-10T22:08:51Z and status eq 'Open'"),
	})
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.TicketsListResult = armsupport.TicketsListResult{
		// 	Value: []*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-11T21: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-12T21: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_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("VirtualMachine"),
		// 						UserConsent: to.Ptr(armsupport.UserConsentYes),
		// 				}},
		// 				ServiceDisplayName: to.Ptr("Virtual Machine running Linux"),
		// 				ServiceID: to.Ptr("/providers/Microsoft.Support/services/virtual_machine_service_guid"),
		// 				ServiceLevelAgreement: &armsupport.ServiceLevelAgreement{
		// 					ExpirationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-12T17:36:18.000Z"); return t}()),
		// 					SLAMinutes: to.Ptr[int32](240),
		// 					StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-11T21:36:18.000Z"); return t}()),
		// 				},
		// 				Severity: to.Ptr(armsupport.SeverityLevelModerate),
		// 				Status: to.Ptr("Open"),
		// 				SupportEngineer: &armsupport.Engineer{
		// 					EmailAddress: to.Ptr("xyz@contoso.com"),
		// 				},
		// 				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"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("testticket2"),
		// 			Type: to.Ptr("Microsoft.Support/supportTickets"),
		// 			ID: to.Ptr("/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/supportTickets/testticket2"),
		// 			Properties: &armsupport.TicketDetailsProperties{
		// 				Description: to.Ptr("This is a test - please ignore"),
		// 				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-11T21: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-12T21:36:18.000Z"); return t}()),
		// 				ProblemClassificationDisplayName: to.Ptr("Add or Edit VAT, TAX ID, or PO Number"),
		// 				ProblemClassificationID: to.Ptr("/providers/Microsoft.Support/services/subscription_management_service_guid/problemClassifications/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-12T17:36:18.000Z"); return t}()),
		// 					SLAMinutes: to.Ptr[int32](240),
		// 					StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-11T21:36:18.000Z"); return t}()),
		// 				},
		// 				Severity: to.Ptr(armsupport.SeverityLevelMinimal),
		// 				Status: to.Ptr("Open"),
		// 				SupportEngineer: &armsupport.Engineer{
		// 					EmailAddress: to.Ptr("xyz@contoso.com"),
		// 				},
		// 				SupportPlanDisplayName: to.Ptr("Premier"),
		// 				SupportPlanID: to.Ptr("U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw="),
		// 				SupportPlanType: to.Ptr("Premier"),
		// 				SupportTicketID: to.Ptr("118032014183771"),
		// 				Title: to.Ptr("Test - please ignore"),
		// 			},
		// 	}},
		// }
	}
}
Output:

Example (ListSupportTicketsCreatedOnOrAfterACertainDateAndInUpdatingStateForASubscription)

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/ListSupportTicketsCreatedOnOrAfterAndInUpdatingStateBySubscription.json

package main

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"
)

func main() {
	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)
	}
	pager := clientFactory.NewTicketsClient().NewListPager(&armsupport.TicketsClientListOptions{Top: nil,
		Filter: to.Ptr("createdDate ge 2020-03-10T22:08:51Z and status eq 'Updating'"),
	})
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.TicketsListResult = armsupport.TicketsListResult{
		// 	Value: []*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-11T21: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-12T21: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_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("VirtualMachine"),
		// 						UserConsent: to.Ptr(armsupport.UserConsentYes),
		// 				}},
		// 				ServiceDisplayName: to.Ptr("Virtual Machine running Linux"),
		// 				ServiceID: to.Ptr("/providers/Microsoft.Support/services/virtual_machine_service_guid"),
		// 				ServiceLevelAgreement: &armsupport.ServiceLevelAgreement{
		// 					ExpirationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-12T17:36:18.000Z"); return t}()),
		// 					SLAMinutes: to.Ptr[int32](240),
		// 					StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-11T21:36:18.000Z"); return t}()),
		// 				},
		// 				Severity: to.Ptr(armsupport.SeverityLevelModerate),
		// 				Status: to.Ptr("Updating"),
		// 				SupportEngineer: &armsupport.Engineer{
		// 					EmailAddress: to.Ptr("xyz@contoso.com"),
		// 				},
		// 				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"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("testticket2"),
		// 			Type: to.Ptr("Microsoft.Support/supportTickets"),
		// 			ID: to.Ptr("/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/supportTickets/testticket2"),
		// 			Properties: &armsupport.TicketDetailsProperties{
		// 				Description: to.Ptr("This is a test - please ignore"),
		// 				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-11T21: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-12T21:36:18.000Z"); return t}()),
		// 				ProblemClassificationDisplayName: to.Ptr("Add or Edit VAT, TAX ID, or PO Number"),
		// 				ProblemClassificationID: to.Ptr("/providers/Microsoft.Support/services/subscription_management_service_guid/problemClassifications/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-12T17:36:18.000Z"); return t}()),
		// 					SLAMinutes: to.Ptr[int32](240),
		// 					StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-11T21:36:18.000Z"); return t}()),
		// 				},
		// 				Severity: to.Ptr(armsupport.SeverityLevelMinimal),
		// 				Status: to.Ptr("Updating"),
		// 				SupportEngineer: &armsupport.Engineer{
		// 					EmailAddress: to.Ptr("xyz@contoso.com"),
		// 				},
		// 				SupportPlanDisplayName: to.Ptr("Premier"),
		// 				SupportPlanID: to.Ptr("U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw="),
		// 				SupportPlanType: to.Ptr("Premier"),
		// 				SupportTicketID: to.Ptr("118032014183771"),
		// 				Title: to.Ptr("Test - please ignore"),
		// 			},
		// 	}},
		// }
	}
}
Output:

Example (ListSupportTicketsForASubscription)

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/ListSupportTicketsBySubscription.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/support/armsupport"
)

func main() {
	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)
	}
	pager := clientFactory.NewTicketsClient().NewListPager(&armsupport.TicketsClientListOptions{Top: nil,
		Filter: nil,
	})
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.TicketsListResult = armsupport.TicketsListResult{
		// 	Value: []*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_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("VirtualMachine"),
		// 						UserConsent: to.Ptr(armsupport.UserConsentYes),
		// 				}},
		// 				ServiceDisplayName: to.Ptr("Virtual Machine running Linux"),
		// 				ServiceID: to.Ptr("/providers/Microsoft.Support/services/virtual_machine_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{
		// 					EmailAddress: to.Ptr("xyz@contoso.com"),
		// 				},
		// 				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"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("testticket2"),
		// 			Type: to.Ptr("Microsoft.Support/supportTickets"),
		// 			ID: to.Ptr("/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/supportTickets/testticket2"),
		// 			Properties: &armsupport.TicketDetailsProperties{
		// 				Description: to.Ptr("This is a test - please ignore"),
		// 				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("Add or Edit VAT, TAX ID, or PO Number"),
		// 				ProblemClassificationID: to.Ptr("/providers/Microsoft.Support/services/subscription_management_service_guid/problemClassifications/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.SeverityLevelMinimal),
		// 				Status: to.Ptr("Open"),
		// 				SupportEngineer: &armsupport.Engineer{
		// 					EmailAddress: to.Ptr("xyz@contoso.com"),
		// 				},
		// 				SupportPlanDisplayName: to.Ptr("Premier"),
		// 				SupportPlanID: to.Ptr("U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw="),
		// 				SupportPlanType: to.Ptr("Premier"),
		// 				SupportTicketID: to.Ptr("118032014183771"),
		// 				Title: to.Ptr("Test - please ignore"),
		// 			},
		// 	}},
		// }
	}
}
Output:

Example (ListSupportTicketsInOpenStateForASubscription)

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/ListSupportTicketsInOpenStateBySubscription.json

package main

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"
)

func main() {
	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)
	}
	pager := clientFactory.NewTicketsClient().NewListPager(&armsupport.TicketsClientListOptions{Top: nil,
		Filter: to.Ptr("status eq 'Open'"),
	})
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.TicketsListResult = armsupport.TicketsListResult{
		// 	Value: []*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_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("VirtualMachine"),
		// 						UserConsent: to.Ptr(armsupport.UserConsentYes),
		// 				}},
		// 				ServiceDisplayName: to.Ptr("Virtual Machine running Linux"),
		// 				ServiceID: to.Ptr("/providers/Microsoft.Support/services/virtual_machine_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{
		// 					EmailAddress: to.Ptr("xyz@contoso.com"),
		// 				},
		// 				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"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("testticket2"),
		// 			Type: to.Ptr("Microsoft.Support/supportTickets"),
		// 			ID: to.Ptr("/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/supportTickets/testticket2"),
		// 			Properties: &armsupport.TicketDetailsProperties{
		// 				Description: to.Ptr("This is a test - please ignore"),
		// 				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("Add or Edit VAT, TAX ID, or PO Number"),
		// 				ProblemClassificationID: to.Ptr("/providers/Microsoft.Support/services/subscription_management_service_guid/problemClassifications/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.SeverityLevelMinimal),
		// 				Status: to.Ptr("Open"),
		// 				SupportEngineer: &armsupport.Engineer{
		// 					EmailAddress: to.Ptr("xyz@contoso.com"),
		// 				},
		// 				SupportPlanDisplayName: to.Ptr("Premier"),
		// 				SupportPlanID: to.Ptr("U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw="),
		// 				SupportPlanType: to.Ptr("Premier"),
		// 				SupportTicketID: to.Ptr("118032014183771"),
		// 				Title: to.Ptr("Test - please ignore"),
		// 			},
		// 	}},
		// }
	}
}
Output:

Example (ListSupportTicketsInUpdatingStateForASubscription)

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/ListSupportTicketsInUpdatingStateBySubscription.json

package main

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"
)

func main() {
	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)
	}
	pager := clientFactory.NewTicketsClient().NewListPager(&armsupport.TicketsClientListOptions{Top: nil,
		Filter: to.Ptr("status eq 'Updating'"),
	})
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.TicketsListResult = armsupport.TicketsListResult{
		// 	Value: []*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_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("VirtualMachine"),
		// 						UserConsent: to.Ptr(armsupport.UserConsentYes),
		// 				}},
		// 				ServiceDisplayName: to.Ptr("Virtual Machine running Linux"),
		// 				ServiceID: to.Ptr("/providers/Microsoft.Support/services/virtual_machine_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("Updating"),
		// 				SupportEngineer: &armsupport.Engineer{
		// 					EmailAddress: to.Ptr("xyz@contoso.com"),
		// 				},
		// 				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"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("testticket2"),
		// 			Type: to.Ptr("Microsoft.Support/supportTickets"),
		// 			ID: to.Ptr("/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/supportTickets/testticket2"),
		// 			Properties: &armsupport.TicketDetailsProperties{
		// 				Description: to.Ptr("This is a test - please ignore"),
		// 				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("Add or Edit VAT, TAX ID, or PO Number"),
		// 				ProblemClassificationID: to.Ptr("/providers/Microsoft.Support/services/subscription_management_service_guid/problemClassifications/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.SeverityLevelMinimal),
		// 				Status: to.Ptr("Updating"),
		// 				SupportEngineer: &armsupport.Engineer{
		// 					EmailAddress: to.Ptr("xyz@contoso.com"),
		// 				},
		// 				SupportPlanDisplayName: to.Ptr("Premier"),
		// 				SupportPlanID: to.Ptr("U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw="),
		// 				SupportPlanType: to.Ptr("Premier"),
		// 				SupportTicketID: to.Ptr("118032014183771"),
		// 				Title: to.Ptr("Test - please ignore"),
		// 			},
		// 	}},
		// }
	}
}
Output:

Example (ListSupportTicketsWithACertainProblemClassificationIdForASubscription)

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/ListSupportTicketsProblemClassificationIdEqualsForSubscription.json

package main

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"
)

func main() {
	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)
	}
	pager := clientFactory.NewTicketsClient().NewListPager(&armsupport.TicketsClientListOptions{Top: nil,
		Filter: to.Ptr("ProblemClassificationId eq 'compute_vm_problemClassification_guid'"),
	})
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.TicketsListResult = armsupport.TicketsListResult{
		// 	Value: []*armsupport.TicketDetails{
		// 		{
		// 			Name: to.Ptr("testTicket1"),
		// 			Type: to.Ptr("Microsoft.Support/supportTickets"),
		// 			ID: to.Ptr("/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/supportTickets/testTicket1"),
		// 			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, "2022-05-04T21:52:10.000Z"); return t}()),
		// 				EnrollmentID: to.Ptr(""),
		// 				FileWorkspaceName: to.Ptr("testTicket1"),
		// 				ModifiedDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-05-12T23:05:19.000Z"); return t}()),
		// 				ProblemClassificationDisplayName: to.Ptr("Compute-VM (cores-vCPUs) subscription limit increases"),
		// 				ProblemClassificationID: to.Ptr("/providers/Microsoft.Support/services/service_guid/problemClassifications/compute_vm_problemClassification_guid"),
		// 				Require24X7Response: to.Ptr(false),
		// 				ServiceDisplayName: to.Ptr("service_displayName"),
		// 				ServiceID: to.Ptr("/providers/Microsoft.Support/services/service_guid"),
		// 				Severity: to.Ptr(armsupport.SeverityLevelMinimal),
		// 				Status: to.Ptr("Open"),
		// 				SupportEngineer: &armsupport.Engineer{
		// 					EmailAddress: to.Ptr("xyz@contoso.com"),
		// 				},
		// 				SupportPlanDisplayName: to.Ptr("Premier"),
		// 				SupportPlanID: to.Ptr("U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw="),
		// 				SupportPlanType: to.Ptr("Premier"),
		// 				SupportTicketID: to.Ptr("2205060010000072"),
		// 				Title: to.Ptr("my title"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("testTicket2"),
		// 			Type: to.Ptr("Microsoft.Support/supportTickets"),
		// 			ID: to.Ptr("/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/supportTickets/testTicket2"),
		// 			Properties: &armsupport.TicketDetailsProperties{
		// 				Description: to.Ptr("This is a test - please ignore"),
		// 				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, "2022-05-04T21:38:42.000Z"); return t}()),
		// 				FileWorkspaceName: to.Ptr("testTicket2"),
		// 				ModifiedDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-05-04T21:39:14.000Z"); return t}()),
		// 				ProblemClassificationDisplayName: to.Ptr("Compute-VM (cores-vCPUs) subscription limit increases"),
		// 				ProblemClassificationID: to.Ptr("/providers/Microsoft.Support/services/service_guid/problemClassifications/compute_vm_problemClassification_guid"),
		// 				Require24X7Response: to.Ptr(false),
		// 				ServiceDisplayName: to.Ptr("service_displayName"),
		// 				ServiceID: to.Ptr("/providers/Microsoft.Support/services/service_guid"),
		// 				Severity: to.Ptr(armsupport.SeverityLevelMinimal),
		// 				Status: to.Ptr("Open"),
		// 				SupportEngineer: &armsupport.Engineer{
		// 					EmailAddress: to.Ptr("xyz@contoso.com"),
		// 				},
		// 				SupportPlanDisplayName: to.Ptr("Premier"),
		// 				SupportPlanID: to.Ptr("U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw="),
		// 				SupportPlanType: to.Ptr("Premier"),
		// 				SupportTicketID: to.Ptr("2205040010000077"),
		// 				Title: to.Ptr("Test - please ignore"),
		// 			},
		// 	}},
		// }
	}
}
Output:

Example (ListSupportTicketsWithACertainServiceIdForASubscription)

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/ListSupportTicketsServiceIdEqualsForSubscription.json

package main

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"
)

func main() {
	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)
	}
	pager := clientFactory.NewTicketsClient().NewListPager(&armsupport.TicketsClientListOptions{Top: nil,
		Filter: to.Ptr("ServiceId eq 'vm_windows_service_guid'"),
	})
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.TicketsListResult = armsupport.TicketsListResult{
		// 	Value: []*armsupport.TicketDetails{
		// 		{
		// 			Name: to.Ptr("testticket1"),
		// 			Type: to.Ptr("Microsoft.Support/supportTickets"),
		// 			ID: to.Ptr("/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/supportTickets"),
		// 			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, "2022-05-04T21:52:10.000Z"); return t}()),
		// 				EnrollmentID: to.Ptr(""),
		// 				FileWorkspaceName: to.Ptr("6f16735c-1530836f-e9970f1a-2e49-47b7-96cd-9746b83aa066"),
		// 				ModifiedDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-05-12T23:05:19.000Z"); return t}()),
		// 				ProblemClassificationDisplayName: to.Ptr("problemClassification_displayName"),
		// 				ProblemClassificationID: to.Ptr("/providers/Microsoft.Support/services/vm_windows_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("VirtualMachine"),
		// 						UserConsent: to.Ptr(armsupport.UserConsentYes),
		// 				}},
		// 				ServiceDisplayName: to.Ptr("Virtual Machine running Windows"),
		// 				ServiceID: to.Ptr("/providers/Microsoft.Support/services/vm_windows_service_guid"),
		// 				Severity: to.Ptr(armsupport.SeverityLevelMinimal),
		// 				Status: to.Ptr("Open"),
		// 				SupportEngineer: &armsupport.Engineer{
		// 					EmailAddress: to.Ptr("xyz@contoso.com"),
		// 				},
		// 				SupportPlanDisplayName: to.Ptr("Premier"),
		// 				SupportPlanID: to.Ptr("U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw="),
		// 				SupportPlanType: to.Ptr("Premier"),
		// 				SupportTicketID: to.Ptr("2205040010000082"),
		// 				Title: to.Ptr("my title"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("testticket2"),
		// 			Type: to.Ptr("Microsoft.Support/supportTickets"),
		// 			ID: to.Ptr("/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/supportTickets"),
		// 			Properties: &armsupport.TicketDetailsProperties{
		// 				Description: to.Ptr("This is a test - please ignore"),
		// 				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, "2022-05-04T21:38:42.000Z"); return t}()),
		// 				FileWorkspaceName: to.Ptr("6f16735c-1530836f-e9970f1a-2e49-47b7-96cd-9746b83aa066"),
		// 				ModifiedDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-05-04T21:39:14.000Z"); return t}()),
		// 				ProblemClassificationDisplayName: to.Ptr("problemClassification_displayName"),
		// 				ProblemClassificationID: to.Ptr("/providers/Microsoft.Support/services/vm_windows_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("VirtualMachine"),
		// 						UserConsent: to.Ptr(armsupport.UserConsentYes),
		// 				}},
		// 				ServiceDisplayName: to.Ptr("Virtual Machine running Windows"),
		// 				ServiceID: to.Ptr("/providers/Microsoft.Support/services/vm_windows_service_guid"),
		// 				Severity: to.Ptr(armsupport.SeverityLevelMinimal),
		// 				Status: to.Ptr("Open"),
		// 				SupportEngineer: &armsupport.Engineer{
		// 					EmailAddress: to.Ptr("xyz@contoso.com"),
		// 				},
		// 				SupportPlanDisplayName: to.Ptr("Premier"),
		// 				SupportPlanID: to.Ptr("U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw="),
		// 				SupportPlanType: to.Ptr("Premier"),
		// 				SupportTicketID: to.Ptr("2205040010000080"),
		// 				Title: to.Ptr("Test - please ignore"),
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*TicketsClient) Update added in v0.2.0

func (client *TicketsClient) Update(ctx context.Context, supportTicketName string, updateSupportTicket UpdateSupportTicket, options *TicketsClientUpdateOptions) (TicketsClientUpdateResponse, error)

Update - This API allows you to update the severity level, ticket status, advanced diagnostic consent and your contact information in the support ticket. Note: The severity levels cannot be changed if a support ticket is actively being worked upon by an Azure support engineer. In such a case, contact your support engineer to request severity update by adding a new communication using the Communications API. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-04-01

  • supportTicketName - Support ticket name.
  • updateSupportTicket - UpdateSupportTicket object.
  • options - TicketsClientUpdateOptions contains the optional parameters for the TicketsClient.Update method.
Example (UpdateAdvancedDiagnosticConsentOfASubscriptionSupportTicket)

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/UpdateAdvancedDiagnosticConsentOfSupportTicketForSubscription.json

package main

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"
)

func main() {
	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)
	}
	res, err := clientFactory.NewTicketsClient().Update(ctx, "testticket", armsupport.UpdateSupportTicket{
		AdvancedDiagnosticConsent: to.Ptr(armsupport.ConsentYes),
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %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("This is a test - please ignore"),
	// 		AdvancedDiagnosticConsent: to.Ptr(armsupport.ConsentYes),
	// 		ContactDetails: &armsupport.ContactProfile{
	// 			AdditionalEmailAddresses: []*string{
	// 				to.Ptr("tname@contoso.com"),
	// 				to.Ptr("teamtest@contoso.com")},
	// 				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("test.name@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("Add or Edit VAT, TAX ID, or PO Number"),
	// 			ProblemClassificationID: to.Ptr("/providers/Microsoft.Support/services/subscription_management_service_guid/problemClassifications/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.SeverityLevelCritical),
	// 			Status: to.Ptr("Open"),
	// 			SupportEngineer: &armsupport.Engineer{
	// 				EmailAddress: to.Ptr("xyz@contoso.com"),
	// 			},
	// 			SupportPlanDisplayName: to.Ptr("Premier"),
	// 			SupportPlanID: to.Ptr("U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw="),
	// 			SupportPlanType: to.Ptr("Premier"),
	// 			SupportTicketID: to.Ptr("118032014183770"),
	// 			Title: to.Ptr("Test - please ignore"),
	// 		},
	// 	}
}
Output:

Example (UpdateContactDetailsOfASubscriptionSupportTicket)

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/UpdateContactDetailsOfSupportTicketForSubscription.json

package main

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"
)

func main() {
	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)
	}
	res, err := clientFactory.NewTicketsClient().Update(ctx, "testticket", armsupport.UpdateSupportTicket{
		ContactDetails: &armsupport.UpdateContactProfile{
			AdditionalEmailAddresses: []*string{
				to.Ptr("tname@contoso.com"),
				to.Ptr("teamtest@contoso.com")},
			Country:                  to.Ptr("USA"),
			FirstName:                to.Ptr("first name"),
			LastName:                 to.Ptr("last name"),
			PhoneNumber:              to.Ptr("123-456-7890"),
			PreferredContactMethod:   to.Ptr(armsupport.PreferredContactMethodEmail),
			PreferredSupportLanguage: to.Ptr("en-US"),
			PreferredTimeZone:        to.Ptr("Pacific Standard Time"),
			PrimaryEmailAddress:      to.Ptr("test.name@contoso.com"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %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("This is a test - please ignore"),
	// 		AdvancedDiagnosticConsent: to.Ptr(armsupport.ConsentNo),
	// 		ContactDetails: &armsupport.ContactProfile{
	// 			AdditionalEmailAddresses: []*string{
	// 				to.Ptr("tname@contoso.com"),
	// 				to.Ptr("teamtest@contoso.com")},
	// 				Country: to.Ptr("USA"),
	// 				FirstName: to.Ptr("first name"),
	// 				LastName: to.Ptr("last name"),
	// 				PhoneNumber: to.Ptr("123-456-7890"),
	// 				PreferredContactMethod: to.Ptr(armsupport.PreferredContactMethodEmail),
	// 				PreferredSupportLanguage: to.Ptr("en-US"),
	// 				PreferredTimeZone: to.Ptr("Pacific Standard Time"),
	// 				PrimaryEmailAddress: to.Ptr("test.name@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("Add or Edit VAT, TAX ID, or PO Number"),
	// 			ProblemClassificationID: to.Ptr("/providers/Microsoft.Support/services/subscription_management_service_guid/problemClassifications/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.SeverityLevelCritical),
	// 			Status: to.Ptr("Open"),
	// 			SupportEngineer: &armsupport.Engineer{
	// 				EmailAddress: to.Ptr("xyz@contoso.com"),
	// 			},
	// 			SupportPlanDisplayName: to.Ptr("Premier"),
	// 			SupportPlanID: to.Ptr("U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw="),
	// 			SupportPlanType: to.Ptr("Premier"),
	// 			SupportTicketID: to.Ptr("118032014183770"),
	// 			Title: to.Ptr("Test - please ignore"),
	// 		},
	// 	}
}
Output:

Example (UpdateSeverityOfASubscriptionSupportTicket)

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/UpdateSeverityOfSupportTicketForSubscription.json

package main

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"
)

func main() {
	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)
	}
	res, err := clientFactory.NewTicketsClient().Update(ctx, "testticket", armsupport.UpdateSupportTicket{
		Severity: to.Ptr(armsupport.SeverityLevelCritical),
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %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("This is a test - please ignore"),
	// 		AdvancedDiagnosticConsent: to.Ptr(armsupport.ConsentNo),
	// 		ContactDetails: &armsupport.ContactProfile{
	// 			AdditionalEmailAddresses: []*string{
	// 				to.Ptr("tname@contoso.com"),
	// 				to.Ptr("teamtest@contoso.com")},
	// 				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("test.name@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("Add or Edit VAT, TAX ID, or PO Number"),
	// 			ProblemClassificationID: to.Ptr("/providers/Microsoft.Support/services/subscription_management_service_guid/problemClassifications/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.SeverityLevelCritical),
	// 			Status: to.Ptr("Open"),
	// 			SupportEngineer: &armsupport.Engineer{
	// 				EmailAddress: to.Ptr("xyz@contoso.com"),
	// 			},
	// 			SupportPlanDisplayName: to.Ptr("Premier"),
	// 			SupportPlanID: to.Ptr("U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw="),
	// 			SupportPlanType: to.Ptr("Premier"),
	// 			SupportTicketID: to.Ptr("118032014183770"),
	// 			Title: to.Ptr("Test - please ignore"),
	// 		},
	// 	}
}
Output:

Example (UpdateStatusOfASubscriptionSupportTicket)

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/UpdateStatusOfSupportTicketForSubscription.json

package main

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"
)

func main() {
	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)
	}
	res, err := clientFactory.NewTicketsClient().Update(ctx, "testticket", armsupport.UpdateSupportTicket{
		Status: to.Ptr(armsupport.StatusClosed),
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %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("This is a test - please ignore"),
	// 		AdvancedDiagnosticConsent: to.Ptr(armsupport.ConsentNo),
	// 		ContactDetails: &armsupport.ContactProfile{
	// 			AdditionalEmailAddresses: []*string{
	// 				to.Ptr("tname@contoso.com"),
	// 				to.Ptr("teamtest@contoso.com")},
	// 				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("test.name@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("Add or Edit VAT, TAX ID, or PO Number"),
	// 			ProblemClassificationID: to.Ptr("/providers/Microsoft.Support/services/subscription_management_service_guid/problemClassifications/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.SeverityLevelCritical),
	// 			Status: to.Ptr("Closed"),
	// 			SupportEngineer: &armsupport.Engineer{
	// 			},
	// 			SupportPlanDisplayName: to.Ptr("Premier"),
	// 			SupportPlanID: to.Ptr("U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw="),
	// 			SupportPlanType: to.Ptr("Premier"),
	// 			SupportTicketID: to.Ptr("118032014183770"),
	// 			Title: to.Ptr("Test - please ignore"),
	// 		},
	// 	}
}
Output:

type TicketsClientBeginCreateOptions added in v0.2.0

type TicketsClientBeginCreateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

TicketsClientBeginCreateOptions contains the optional parameters for the TicketsClient.BeginCreate method.

type TicketsClientCheckNameAvailabilityOptions added in v0.2.0

type TicketsClientCheckNameAvailabilityOptions struct {
}

TicketsClientCheckNameAvailabilityOptions contains the optional parameters for the TicketsClient.CheckNameAvailability method.

type TicketsClientCheckNameAvailabilityResponse added in v0.2.0

type TicketsClientCheckNameAvailabilityResponse struct {
	// Output of check name availability API.
	CheckNameAvailabilityOutput
}

TicketsClientCheckNameAvailabilityResponse contains the response from method TicketsClient.CheckNameAvailability.

type TicketsClientCreateResponse added in v0.2.0

type TicketsClientCreateResponse struct {
	// Object that represents SupportTicketDetails resource.
	TicketDetails
}

TicketsClientCreateResponse contains the response from method TicketsClient.BeginCreate.

type TicketsClientGetOptions added in v0.2.0

type TicketsClientGetOptions struct {
}

TicketsClientGetOptions contains the optional parameters for the TicketsClient.Get method.

type TicketsClientGetResponse added in v0.2.0

type TicketsClientGetResponse struct {
	// Object that represents SupportTicketDetails resource.
	TicketDetails
}

TicketsClientGetResponse contains the response from method TicketsClient.Get.

type TicketsClientListOptions added in v0.2.0

type TicketsClientListOptions struct {
	// The filter to apply on the operation. We support 'odata v4.0' filter semantics. Learn more [https://docs.microsoft.com/odata/concepts/queryoptions-overview].
	// Status, ServiceId, and
	// ProblemClassificationId filters can only be used with Equals ('eq') operator. For CreatedDate filter, the supported operators
	// are Greater Than ('gt') and Greater Than or Equals ('ge'). When using both
	// filters, combine them using the logical 'AND'.
	Filter *string

	// The number of values to return in the collection. Default is 25 and max is 100.
	Top *int32
}

TicketsClientListOptions contains the optional parameters for the TicketsClient.NewListPager method.

type TicketsClientListResponse added in v0.2.0

type TicketsClientListResponse struct {
	// Object that represents a collection of SupportTicket resources.
	TicketsListResult
}

TicketsClientListResponse contains the response from method TicketsClient.NewListPager.

type TicketsClientUpdateOptions added in v0.2.0

type TicketsClientUpdateOptions struct {
}

TicketsClientUpdateOptions contains the optional parameters for the TicketsClient.Update method.

type TicketsClientUpdateResponse added in v0.2.0

type TicketsClientUpdateResponse struct {
	// Object that represents SupportTicketDetails resource.
	TicketDetails
}

TicketsClientUpdateResponse contains the response from method TicketsClient.Update.

type TicketsListResult added in v0.2.0

type TicketsListResult struct {
	// The URI to fetch the next page of SupportTicket resources.
	NextLink *string

	// List of SupportTicket resources.
	Value []*TicketDetails
}

TicketsListResult - Object that represents a collection of SupportTicket resources.

func (TicketsListResult) MarshalJSON added in v0.2.0

func (t TicketsListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TicketsListResult.

func (*TicketsListResult) UnmarshalJSON added in v1.1.0

func (t *TicketsListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TicketsListResult.

type TicketsNoSubscriptionClient added in v1.3.0

type TicketsNoSubscriptionClient struct {
	// contains filtered or unexported fields
}

TicketsNoSubscriptionClient contains the methods for the SupportTicketsNoSubscription group. Don't use this type directly, use NewTicketsNoSubscriptionClient() instead.

func NewTicketsNoSubscriptionClient added in v1.3.0

func NewTicketsNoSubscriptionClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*TicketsNoSubscriptionClient, error)

NewTicketsNoSubscriptionClient creates a new instance of TicketsNoSubscriptionClient with the specified values.

  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*TicketsNoSubscriptionClient) BeginCreate added in v1.3.0

BeginCreate - Creates a new support ticket for Billing, and Subscription Management issues. Learn the prerequisites [https://aka.ms/supportAPI] required to create a support ticket. Always call the Services and ProblemClassifications API to get the most recent set of services and problem categories required for support ticket creation. Adding attachments is not currently supported via the API. To add a file to an existing support ticket, visit the Manage support ticket [https://portal.azure.com/#blade/MicrosoftAzure Support/HelpAndSupportBlade/managesupportrequest] page in the Azure portal, select the support ticket, and use the file upload control to add a new file. Providing consent to share diagnostic information with Azure support is currently not supported via the API. The Azure support engineer working on your ticket will reach out to you for consent if your issue requires gathering diagnostic information from your Azure resources. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-04-01

  • supportTicketName - Support ticket name.
  • createSupportTicketParameters - Support ticket request payload.
  • options - TicketsNoSubscriptionClientBeginCreateOptions contains the optional parameters for the TicketsNoSubscriptionClient.BeginCreate method.
Example (CreateATicketForBillingRelatedIssues)

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/CreateBillingSupportTicket.json

package main

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"
)

func main() {
	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.NewTicketsNoSubscriptionClient().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("/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"),
	// 	},
	// }
}
Output:

Example (CreateATicketForSubscriptionManagementRelatedIssues)

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/CreateSubMgmtSupportTicket.json

package main

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"
)

func main() {
	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.NewTicketsNoSubscriptionClient().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/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("/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("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"),
	// 	},
	// }
}
Output:

Example (CreateATicketForTechnicalIssueRelatedToASpecificResource)

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/CreateTechnicalSupportTicket.json

package main

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"
)

func main() {
	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.NewTicketsNoSubscriptionClient().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="),
			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("/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"),
	// 		Title: to.Ptr("my title"),
	// 	},
	// }
}
Output:

func (*TicketsNoSubscriptionClient) CheckNameAvailability added in v1.3.0

CheckNameAvailability - Check the availability of a resource name. This API should be used to check the uniqueness of the name for support ticket creation for the selected subscription. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-04-01

  • checkNameAvailabilityInput - Input to check.
  • options - TicketsNoSubscriptionClientCheckNameAvailabilityOptions contains the optional parameters for the TicketsNoSubscriptionClient.CheckNameAvailability method.
Example

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/CheckNameAvailability.json

package main

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"
)

func main() {
	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)
	}
	res, err := clientFactory.NewTicketsNoSubscriptionClient().CheckNameAvailability(ctx, armsupport.CheckNameAvailabilityInput{
		Name: to.Ptr("sampleName"),
		Type: to.Ptr(armsupport.TypeMicrosoftSupportSupportTickets),
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %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.CheckNameAvailabilityOutput = armsupport.CheckNameAvailabilityOutput{
	// 	Message: to.Ptr("Name not available"),
	// 	NameAvailable: to.Ptr(false),
	// 	Reason: to.Ptr("Name is already in use"),
	// }
}
Output:

func (*TicketsNoSubscriptionClient) Get added in v1.3.0

Get - Gets details for a specific support ticket. Support ticket data is available for 18 months after ticket creation. If a ticket was created more than 18 months ago, a request for data might cause an error. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-04-01

  • supportTicketName - Support ticket name.
  • options - TicketsNoSubscriptionClientGetOptions contains the optional parameters for the TicketsNoSubscriptionClient.Get method.
Example

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/GetSupportTicketDetails.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/support/armsupport"
)

func main() {
	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)
	}
	res, err := clientFactory.NewTicketsNoSubscriptionClient().Get(ctx, "testticket", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %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("/providers/Microsoft.Support/supportTickets/testticket"),
	// 	Properties: &armsupport.TicketDetailsProperties{
	// 		Description: to.Ptr("This is a test - please ignore"),
	// 		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("Add or Edit VAT, TAX ID, or PO Number"),
	// 		ProblemClassificationID: to.Ptr("/providers/Microsoft.Support/services/subscription_management_service_guid/problemClassifications/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.SeverityLevelMinimal),
	// 		Status: to.Ptr("Open"),
	// 		SupportEngineer: &armsupport.Engineer{
	// 			EmailAddress: to.Ptr("xyz@contoso.com"),
	// 		},
	// 		SupportPlanDisplayName: to.Ptr("Premier"),
	// 		SupportPlanID: to.Ptr("U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw="),
	// 		SupportPlanType: to.Ptr("Premier"),
	// 		SupportTicketID: to.Ptr("118032014183770"),
	// 		Title: to.Ptr("Test - please ignore"),
	// 	},
	// }
}
Output:

func (*TicketsNoSubscriptionClient) NewListPager added in v1.3.0

NewListPager - Lists all the support tickets. You can also filter the support tickets by Status, CreatedDate, , ServiceId, and ProblemClassificationId using the $filter parameter. Output will be a paged result with nextLink, using which you can retrieve the next set of support tickets. Support ticket data is available for 18 months after ticket creation. If a ticket was created more than 18 months ago, a request for data might cause an error.

Generated from API version 2024-04-01

  • options - TicketsNoSubscriptionClientListOptions contains the optional parameters for the TicketsNoSubscriptionClient.NewListPager method.
Example (ListSupportTickets)

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/ListSupportTickets.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/support/armsupport"
)

func main() {
	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)
	}
	pager := clientFactory.NewTicketsNoSubscriptionClient().NewListPager(&armsupport.TicketsNoSubscriptionClientListOptions{Top: nil,
		Filter: nil,
	})
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.TicketsListResult = armsupport.TicketsListResult{
		// 	Value: []*armsupport.TicketDetails{
		// 		{
		// 			Name: to.Ptr("testticket"),
		// 			Type: to.Ptr("Microsoft.Support/supportTickets"),
		// 			ID: to.Ptr("/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_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("VirtualMachine"),
		// 						UserConsent: to.Ptr(armsupport.UserConsentYes),
		// 				}},
		// 				ServiceDisplayName: to.Ptr("Virtual Machine running Linux"),
		// 				ServiceID: to.Ptr("/providers/Microsoft.Support/services/virtual_machine_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{
		// 					EmailAddress: to.Ptr("xyz@contoso.com"),
		// 				},
		// 				SupportPlanID: to.Ptr("U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw="),
		// 				SupportPlanType: to.Ptr("Premier"),
		// 				SupportTicketID: to.Ptr("119120321001170"),
		// 				Title: to.Ptr("my title"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("testticket2"),
		// 			Type: to.Ptr("Microsoft.Support/supportTickets"),
		// 			ID: to.Ptr("/providers/Microsoft.Support/supportTickets/testticket2"),
		// 			Properties: &armsupport.TicketDetailsProperties{
		// 				Description: to.Ptr("This is a test - please ignore"),
		// 				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("Add or Edit VAT, TAX ID, or PO Number"),
		// 				ProblemClassificationID: to.Ptr("/providers/Microsoft.Support/services/subscription_management_service_guid/problemClassifications/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.SeverityLevelMinimal),
		// 				Status: to.Ptr("Open"),
		// 				SupportEngineer: &armsupport.Engineer{
		// 					EmailAddress: to.Ptr("xyz@contoso.com"),
		// 				},
		// 				SupportPlanDisplayName: to.Ptr("Premier"),
		// 				SupportPlanID: to.Ptr("U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw="),
		// 				SupportPlanType: to.Ptr("Premier"),
		// 				SupportTicketID: to.Ptr("118032014183771"),
		// 				Title: to.Ptr("Test - please ignore"),
		// 			},
		// 	}},
		// }
	}
}
Output:

Example (ListSupportTicketsCreatedOnOrAfterACertainDateAndInOpenState)

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/ListSupportTicketsCreatedOnOrAfterAndInOpenState.json

package main

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"
)

func main() {
	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)
	}
	pager := clientFactory.NewTicketsNoSubscriptionClient().NewListPager(&armsupport.TicketsNoSubscriptionClientListOptions{Top: nil,
		Filter: to.Ptr("createdDate ge 2020-03-10T22:08:51Z and status eq 'Open'"),
	})
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.TicketsListResult = armsupport.TicketsListResult{
		// 	Value: []*armsupport.TicketDetails{
		// 		{
		// 			Name: to.Ptr("testticket"),
		// 			Type: to.Ptr("Microsoft.Support/supportTickets"),
		// 			ID: to.Ptr("/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-11T21: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-12T21: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_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("VirtualMachine"),
		// 						UserConsent: to.Ptr(armsupport.UserConsentYes),
		// 				}},
		// 				ServiceDisplayName: to.Ptr("Virtual Machine running Linux"),
		// 				ServiceID: to.Ptr("/providers/Microsoft.Support/services/virtual_machine_service_guid"),
		// 				ServiceLevelAgreement: &armsupport.ServiceLevelAgreement{
		// 					ExpirationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-12T17:36:18.000Z"); return t}()),
		// 					SLAMinutes: to.Ptr[int32](240),
		// 					StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-11T21:36:18.000Z"); return t}()),
		// 				},
		// 				Severity: to.Ptr(armsupport.SeverityLevelModerate),
		// 				Status: to.Ptr("Open"),
		// 				SupportEngineer: &armsupport.Engineer{
		// 					EmailAddress: to.Ptr("xyz@contoso.com"),
		// 				},
		// 				SupportPlanDisplayName: to.Ptr("Premier"),
		// 				SupportPlanID: to.Ptr("U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw="),
		// 				SupportPlanType: to.Ptr("Premier"),
		// 				SupportTicketID: to.Ptr("119120321001170"),
		// 				Title: to.Ptr("my title"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("testticket2"),
		// 			Type: to.Ptr("Microsoft.Support/supportTickets"),
		// 			ID: to.Ptr("/providers/Microsoft.Support/supportTickets/testticket2"),
		// 			Properties: &armsupport.TicketDetailsProperties{
		// 				Description: to.Ptr("This is a test - please ignore"),
		// 				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-11T21: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-12T21:36:18.000Z"); return t}()),
		// 				ProblemClassificationDisplayName: to.Ptr("Add or Edit VAT, TAX ID, or PO Number"),
		// 				ProblemClassificationID: to.Ptr("/providers/Microsoft.Support/services/subscription_management_service_guid/problemClassifications/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-12T17:36:18.000Z"); return t}()),
		// 					SLAMinutes: to.Ptr[int32](240),
		// 					StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-11T21:36:18.000Z"); return t}()),
		// 				},
		// 				Severity: to.Ptr(armsupport.SeverityLevelMinimal),
		// 				Status: to.Ptr("Open"),
		// 				SupportEngineer: &armsupport.Engineer{
		// 					EmailAddress: to.Ptr("xyz@contoso.com"),
		// 				},
		// 				SupportPlanDisplayName: to.Ptr("Premier"),
		// 				SupportPlanID: to.Ptr("U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw="),
		// 				SupportPlanType: to.Ptr("Premier"),
		// 				SupportTicketID: to.Ptr("118032014183771"),
		// 				Title: to.Ptr("Test - please ignore"),
		// 			},
		// 	}},
		// }
	}
}
Output:

Example (ListSupportTicketsCreatedOnOrAfterACertainDateAndInUpdatingState)

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/ListSupportTicketsCreatedOnOrAfterAndInUpdatingState.json

package main

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"
)

func main() {
	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)
	}
	pager := clientFactory.NewTicketsNoSubscriptionClient().NewListPager(&armsupport.TicketsNoSubscriptionClientListOptions{Top: nil,
		Filter: to.Ptr("createdDate ge 2020-03-10T22:08:51Z and status eq 'Updating'"),
	})
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.TicketsListResult = armsupport.TicketsListResult{
		// 	Value: []*armsupport.TicketDetails{
		// 		{
		// 			Name: to.Ptr("testticket"),
		// 			Type: to.Ptr("Microsoft.Support/supportTickets"),
		// 			ID: to.Ptr("/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-11T21: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-12T21: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_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("VirtualMachine"),
		// 						UserConsent: to.Ptr(armsupport.UserConsentYes),
		// 				}},
		// 				ServiceDisplayName: to.Ptr("Virtual Machine running Linux"),
		// 				ServiceID: to.Ptr("/providers/Microsoft.Support/services/virtual_machine_service_guid"),
		// 				ServiceLevelAgreement: &armsupport.ServiceLevelAgreement{
		// 					ExpirationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-12T17:36:18.000Z"); return t}()),
		// 					SLAMinutes: to.Ptr[int32](240),
		// 					StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-11T21:36:18.000Z"); return t}()),
		// 				},
		// 				Severity: to.Ptr(armsupport.SeverityLevelModerate),
		// 				Status: to.Ptr("Updating"),
		// 				SupportEngineer: &armsupport.Engineer{
		// 					EmailAddress: to.Ptr("xyz@contoso.com"),
		// 				},
		// 				SupportPlanDisplayName: to.Ptr("Premier"),
		// 				SupportPlanID: to.Ptr("U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw="),
		// 				SupportPlanType: to.Ptr("Premier"),
		// 				SupportTicketID: to.Ptr("119120321001170"),
		// 				Title: to.Ptr("my title"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("testticket2"),
		// 			Type: to.Ptr("Microsoft.Support/supportTickets"),
		// 			ID: to.Ptr("/providers/Microsoft.Support/supportTickets/testticket2"),
		// 			Properties: &armsupport.TicketDetailsProperties{
		// 				Description: to.Ptr("This is a test - please ignore"),
		// 				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-11T21: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-12T21:36:18.000Z"); return t}()),
		// 				ProblemClassificationDisplayName: to.Ptr("Add or Edit VAT, TAX ID, or PO Number"),
		// 				ProblemClassificationID: to.Ptr("/providers/Microsoft.Support/services/subscription_management_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("VirtualMachine"),
		// 						UserConsent: to.Ptr(armsupport.UserConsentYes),
		// 				}},
		// 				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-12T17:36:18.000Z"); return t}()),
		// 					SLAMinutes: to.Ptr[int32](240),
		// 					StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-11T21:36:18.000Z"); return t}()),
		// 				},
		// 				Severity: to.Ptr(armsupport.SeverityLevelMinimal),
		// 				Status: to.Ptr("Updating"),
		// 				SupportEngineer: &armsupport.Engineer{
		// 					EmailAddress: to.Ptr("xyz@contoso.com"),
		// 				},
		// 				SupportPlanDisplayName: to.Ptr("Premier"),
		// 				SupportPlanID: to.Ptr("U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw="),
		// 				SupportPlanType: to.Ptr("Premier"),
		// 				SupportTicketID: to.Ptr("118032014183771"),
		// 				Title: to.Ptr("Test - please ignore"),
		// 			},
		// 	}},
		// }
	}
}
Output:

Example (ListSupportTicketsInOpenState)

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/ListSupportTicketsInOpenState.json

package main

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"
)

func main() {
	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)
	}
	pager := clientFactory.NewTicketsNoSubscriptionClient().NewListPager(&armsupport.TicketsNoSubscriptionClientListOptions{Top: nil,
		Filter: to.Ptr("status eq 'Open'"),
	})
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.TicketsListResult = armsupport.TicketsListResult{
		// 	Value: []*armsupport.TicketDetails{
		// 		{
		// 			Name: to.Ptr("testticket"),
		// 			Type: to.Ptr("Microsoft.Support/supportTickets"),
		// 			ID: to.Ptr("/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_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("VirtualMachine"),
		// 						UserConsent: to.Ptr(armsupport.UserConsentYes),
		// 				}},
		// 				ServiceDisplayName: to.Ptr("Virtual Machine running Linux"),
		// 				ServiceID: to.Ptr("/providers/Microsoft.Support/services/virtual_machine_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{
		// 					EmailAddress: to.Ptr("xyz@contoso.com"),
		// 				},
		// 				SupportPlanDisplayName: to.Ptr("Premier"),
		// 				SupportPlanID: to.Ptr("U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw="),
		// 				SupportPlanType: to.Ptr("Premier"),
		// 				SupportTicketID: to.Ptr("119120321001170"),
		// 				Title: to.Ptr("my title"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("testticket2"),
		// 			Type: to.Ptr("Microsoft.Support/supportTickets"),
		// 			ID: to.Ptr("/providers/Microsoft.Support/supportTickets/testticket2"),
		// 			Properties: &armsupport.TicketDetailsProperties{
		// 				Description: to.Ptr("This is a test - please ignore"),
		// 				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("Add or Edit VAT, TAX ID, or PO Number"),
		// 				ProblemClassificationID: to.Ptr("/providers/Microsoft.Support/services/subscription_management_service_guid/problemClassifications/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.SeverityLevelMinimal),
		// 				Status: to.Ptr("Open"),
		// 				SupportEngineer: &armsupport.Engineer{
		// 					EmailAddress: to.Ptr("xyz@contoso.com"),
		// 				},
		// 				SupportPlanDisplayName: to.Ptr("Premier"),
		// 				SupportPlanID: to.Ptr("U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw="),
		// 				SupportPlanType: to.Ptr("Premier"),
		// 				SupportTicketID: to.Ptr("118032014183771"),
		// 				Title: to.Ptr("Test - please ignore"),
		// 			},
		// 	}},
		// }
	}
}
Output:

Example (ListSupportTicketsInUpdatingState)

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/ListSupportTicketsInUpdatingState.json

package main

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"
)

func main() {
	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)
	}
	pager := clientFactory.NewTicketsNoSubscriptionClient().NewListPager(&armsupport.TicketsNoSubscriptionClientListOptions{Top: nil,
		Filter: to.Ptr("status eq 'Updating'"),
	})
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.TicketsListResult = armsupport.TicketsListResult{
		// 	Value: []*armsupport.TicketDetails{
		// 		{
		// 			Name: to.Ptr("testticket"),
		// 			Type: to.Ptr("Microsoft.Support/supportTickets"),
		// 			ID: to.Ptr("/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_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("VirtualMachine"),
		// 						UserConsent: to.Ptr(armsupport.UserConsentYes),
		// 				}},
		// 				ServiceDisplayName: to.Ptr("Virtual Machine running Linux"),
		// 				ServiceID: to.Ptr("/providers/Microsoft.Support/services/virtual_machine_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("Updating"),
		// 				SupportEngineer: &armsupport.Engineer{
		// 					EmailAddress: to.Ptr("xyz@contoso.com"),
		// 				},
		// 				SupportPlanDisplayName: to.Ptr("Premier"),
		// 				SupportPlanID: to.Ptr("U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw="),
		// 				SupportPlanType: to.Ptr("Premier"),
		// 				SupportTicketID: to.Ptr("119120321001170"),
		// 				Title: to.Ptr("my title"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("testticket2"),
		// 			Type: to.Ptr("Microsoft.Support/supportTickets"),
		// 			ID: to.Ptr("/providers/Microsoft.Support/supportTickets/testticket2"),
		// 			Properties: &armsupport.TicketDetailsProperties{
		// 				Description: to.Ptr("This is a test - please ignore"),
		// 				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("Add or Edit VAT, TAX ID, or PO Number"),
		// 				ProblemClassificationID: to.Ptr("/providers/Microsoft.Support/services/subscription_management_service_guid/problemClassifications/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.SeverityLevelMinimal),
		// 				Status: to.Ptr("Updating"),
		// 				SupportEngineer: &armsupport.Engineer{
		// 					EmailAddress: to.Ptr("xyz@contoso.com"),
		// 				},
		// 				SupportPlanDisplayName: to.Ptr("Premier"),
		// 				SupportPlanID: to.Ptr("U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw="),
		// 				SupportPlanType: to.Ptr("Premier"),
		// 				SupportTicketID: to.Ptr("118032014183771"),
		// 				Title: to.Ptr("Test - please ignore"),
		// 			},
		// 	}},
		// }
	}
}
Output:

Example (ListSupportTicketsWithACertainProblemClassificationId)

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/ListSupportTicketsProblemClassificationIdEquals.json

package main

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"
)

func main() {
	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)
	}
	pager := clientFactory.NewTicketsNoSubscriptionClient().NewListPager(&armsupport.TicketsNoSubscriptionClientListOptions{Top: nil,
		Filter: to.Ptr("ProblemClassificationId eq 'compute_vm_problemClassification_guid'"),
	})
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.TicketsListResult = armsupport.TicketsListResult{
		// 	Value: []*armsupport.TicketDetails{
		// 		{
		// 			Name: to.Ptr("testTicket1"),
		// 			Type: to.Ptr("Microsoft.Support/supportTickets"),
		// 			ID: to.Ptr("/providers/Microsoft.Support/supportTickets/testTicket1"),
		// 			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, "2022-05-04T21:52:10.000Z"); return t}()),
		// 				EnrollmentID: to.Ptr(""),
		// 				FileWorkspaceName: to.Ptr("testTicket1"),
		// 				ModifiedDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-05-12T23:05:19.000Z"); return t}()),
		// 				ProblemClassificationDisplayName: to.Ptr("Compute-VM (cores-vCPUs) subscription limit increases"),
		// 				ProblemClassificationID: to.Ptr("/providers/Microsoft.Support/services/service_guid/problemClassifications/compute_vm_problemClassification_guid"),
		// 				Require24X7Response: to.Ptr(false),
		// 				ServiceDisplayName: to.Ptr("service_displayName"),
		// 				ServiceID: to.Ptr("/providers/Microsoft.Support/services/service_guid"),
		// 				Severity: to.Ptr(armsupport.SeverityLevelMinimal),
		// 				Status: to.Ptr("Open"),
		// 				SupportEngineer: &armsupport.Engineer{
		// 					EmailAddress: to.Ptr("xyz@contoso.com"),
		// 				},
		// 				SupportPlanDisplayName: to.Ptr("Premier"),
		// 				SupportPlanID: to.Ptr("U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw="),
		// 				SupportPlanType: to.Ptr("Premier"),
		// 				SupportTicketID: to.Ptr("2205060010000072"),
		// 				Title: to.Ptr("my title"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("testTicket2"),
		// 			Type: to.Ptr("Microsoft.Support/supportTickets"),
		// 			ID: to.Ptr("/providers/Microsoft.Support/supportTickets/testTicket2"),
		// 			Properties: &armsupport.TicketDetailsProperties{
		// 				Description: to.Ptr("This is a test - please ignore"),
		// 				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, "2022-05-04T21:38:42.000Z"); return t}()),
		// 				FileWorkspaceName: to.Ptr("testTicket2"),
		// 				ModifiedDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-05-04T21:39:14.000Z"); return t}()),
		// 				ProblemClassificationDisplayName: to.Ptr("Compute-VM (cores-vCPUs) subscription limit increases"),
		// 				ProblemClassificationID: to.Ptr("/providers/Microsoft.Support/services/service_guid/problemClassifications/compute_vm_problemClassification_guid"),
		// 				Require24X7Response: to.Ptr(false),
		// 				ServiceDisplayName: to.Ptr("service_displayName"),
		// 				ServiceID: to.Ptr("/providers/Microsoft.Support/services/service_guid"),
		// 				Severity: to.Ptr(armsupport.SeverityLevelMinimal),
		// 				Status: to.Ptr("Open"),
		// 				SupportEngineer: &armsupport.Engineer{
		// 					EmailAddress: to.Ptr("xyz@contoso.com"),
		// 				},
		// 				SupportPlanDisplayName: to.Ptr("Premier"),
		// 				SupportPlanID: to.Ptr("U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw="),
		// 				SupportPlanType: to.Ptr("Premier"),
		// 				SupportTicketID: to.Ptr("2205040010000077"),
		// 				Title: to.Ptr("Test - please ignore"),
		// 			},
		// 	}},
		// }
	}
}
Output:

Example (ListSupportTicketsWithACertainServiceId)

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/ListSupportTicketsServiceIdEquals.json

package main

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"
)

func main() {
	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)
	}
	pager := clientFactory.NewTicketsNoSubscriptionClient().NewListPager(&armsupport.TicketsNoSubscriptionClientListOptions{Top: nil,
		Filter: to.Ptr("ServiceId eq 'vm_windows_service_guid'"),
	})
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.TicketsListResult = armsupport.TicketsListResult{
		// 	Value: []*armsupport.TicketDetails{
		// 		{
		// 			Name: to.Ptr("testticket1"),
		// 			Type: to.Ptr("Microsoft.Support/supportTickets"),
		// 			ID: to.Ptr("/providers/Microsoft.Support/supportTickets"),
		// 			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, "2022-05-04T21:52:10.000Z"); return t}()),
		// 				EnrollmentID: to.Ptr(""),
		// 				FileWorkspaceName: to.Ptr("6f16735c-1530836f-e9970f1a-2e49-47b7-96cd-9746b83aa066"),
		// 				ModifiedDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-05-12T23:05:19.000Z"); return t}()),
		// 				ProblemClassificationDisplayName: to.Ptr("problemClassification_displayName"),
		// 				ProblemClassificationID: to.Ptr("/providers/Microsoft.Support/services/vm_windows_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("VirtualMachine"),
		// 						UserConsent: to.Ptr(armsupport.UserConsentYes),
		// 				}},
		// 				ServiceDisplayName: to.Ptr("Virtual Machine running Windows"),
		// 				ServiceID: to.Ptr("/providers/Microsoft.Support/services/vm_windows_service_guid"),
		// 				Severity: to.Ptr(armsupport.SeverityLevelMinimal),
		// 				Status: to.Ptr("Open"),
		// 				SupportEngineer: &armsupport.Engineer{
		// 					EmailAddress: to.Ptr("xyz@contoso.com"),
		// 				},
		// 				SupportPlanDisplayName: to.Ptr("Premier"),
		// 				SupportPlanID: to.Ptr("U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw="),
		// 				SupportPlanType: to.Ptr("Premier"),
		// 				SupportTicketID: to.Ptr("2205040010000082"),
		// 				Title: to.Ptr("my title"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("testticket2"),
		// 			Type: to.Ptr("Microsoft.Support/supportTickets"),
		// 			ID: to.Ptr("/providers/Microsoft.Support/supportTickets"),
		// 			Properties: &armsupport.TicketDetailsProperties{
		// 				Description: to.Ptr("This is a test - please ignore"),
		// 				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, "2022-05-04T21:38:42.000Z"); return t}()),
		// 				FileWorkspaceName: to.Ptr("6f16735c-1530836f-e9970f1a-2e49-47b7-96cd-9746b83aa066"),
		// 				ModifiedDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-05-04T21:39:14.000Z"); return t}()),
		// 				ProblemClassificationDisplayName: to.Ptr("problemClassification_displayName"),
		// 				ProblemClassificationID: to.Ptr("/providers/Microsoft.Support/services/vm_windows_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("VirtualMachine"),
		// 						UserConsent: to.Ptr(armsupport.UserConsentYes),
		// 				}},
		// 				ServiceDisplayName: to.Ptr("Virtual Machine running Windows"),
		// 				ServiceID: to.Ptr("/providers/Microsoft.Support/services/vm_windows_service_guid"),
		// 				Severity: to.Ptr(armsupport.SeverityLevelMinimal),
		// 				Status: to.Ptr("Open"),
		// 				SupportEngineer: &armsupport.Engineer{
		// 					EmailAddress: to.Ptr("xyz@contoso.com"),
		// 				},
		// 				SupportPlanDisplayName: to.Ptr("Premier"),
		// 				SupportPlanID: to.Ptr("U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw="),
		// 				SupportPlanType: to.Ptr("Premier"),
		// 				SupportTicketID: to.Ptr("2205040010000080"),
		// 				Title: to.Ptr("Test - please ignore"),
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*TicketsNoSubscriptionClient) Update added in v1.3.0

Update - This API allows you to update the severity level, ticket status, and your contact information in the support ticket. Note: The severity levels cannot be changed if a support ticket is actively being worked upon by an Azure support engineer. In such a case, contact your support engineer to request severity update by adding a new communication using the Communications API. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-04-01

  • supportTicketName - Support ticket name.
  • updateSupportTicket - UpdateSupportTicket object.
  • options - TicketsNoSubscriptionClientUpdateOptions contains the optional parameters for the TicketsNoSubscriptionClient.Update method.
Example (UpdateAdvancedDiagnosticConsentOfASupportTicket)

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/UpdateAdvancedDiagnosticConsentOfSupportTicket.json

package main

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"
)

func main() {
	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)
	}
	res, err := clientFactory.NewTicketsNoSubscriptionClient().Update(ctx, "testticket", armsupport.UpdateSupportTicket{
		AdvancedDiagnosticConsent: to.Ptr(armsupport.ConsentYes),
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %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("/providers/Microsoft.Support/supportTickets/testticket"),
	// 	Properties: &armsupport.TicketDetailsProperties{
	// 		Description: to.Ptr("This is a test - please ignore"),
	// 		AdvancedDiagnosticConsent: to.Ptr(armsupport.ConsentYes),
	// 		ContactDetails: &armsupport.ContactProfile{
	// 			AdditionalEmailAddresses: []*string{
	// 				to.Ptr("tname@contoso.com"),
	// 				to.Ptr("teamtest@contoso.com")},
	// 				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("test.name@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("Add or Edit VAT, TAX ID, or PO Number"),
	// 			ProblemClassificationID: to.Ptr("/providers/Microsoft.Support/services/subscription_management_service_guid/problemClassifications/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.SeverityLevelCritical),
	// 			Status: to.Ptr("Open"),
	// 			SupportEngineer: &armsupport.Engineer{
	// 				EmailAddress: to.Ptr("xyz@contoso.com"),
	// 			},
	// 			SupportPlanDisplayName: to.Ptr("Premier"),
	// 			SupportPlanID: to.Ptr("U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw="),
	// 			SupportPlanType: to.Ptr("Premier"),
	// 			SupportTicketID: to.Ptr("118032014183770"),
	// 			Title: to.Ptr("Test - please ignore"),
	// 		},
	// 	}
}
Output:

Example (UpdateContactDetailsOfASupportTicket)

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/UpdateContactDetailsOfSupportTicket.json

package main

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"
)

func main() {
	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)
	}
	res, err := clientFactory.NewTicketsNoSubscriptionClient().Update(ctx, "testticket", armsupport.UpdateSupportTicket{
		ContactDetails: &armsupport.UpdateContactProfile{
			AdditionalEmailAddresses: []*string{
				to.Ptr("tname@contoso.com"),
				to.Ptr("teamtest@contoso.com")},
			Country:                  to.Ptr("USA"),
			FirstName:                to.Ptr("first name"),
			LastName:                 to.Ptr("last name"),
			PhoneNumber:              to.Ptr("123-456-7890"),
			PreferredContactMethod:   to.Ptr(armsupport.PreferredContactMethodEmail),
			PreferredSupportLanguage: to.Ptr("en-US"),
			PreferredTimeZone:        to.Ptr("Pacific Standard Time"),
			PrimaryEmailAddress:      to.Ptr("test.name@contoso.com"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %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("/providers/Microsoft.Support/supportTickets/testticket"),
	// 	Properties: &armsupport.TicketDetailsProperties{
	// 		Description: to.Ptr("This is a test - please ignore"),
	// 		AdvancedDiagnosticConsent: to.Ptr(armsupport.ConsentYes),
	// 		ContactDetails: &armsupport.ContactProfile{
	// 			AdditionalEmailAddresses: []*string{
	// 				to.Ptr("tname@contoso.com"),
	// 				to.Ptr("teamtest@contoso.com")},
	// 				Country: to.Ptr("USA"),
	// 				FirstName: to.Ptr("first name"),
	// 				LastName: to.Ptr("last name"),
	// 				PhoneNumber: to.Ptr("123-456-7890"),
	// 				PreferredContactMethod: to.Ptr(armsupport.PreferredContactMethodEmail),
	// 				PreferredSupportLanguage: to.Ptr("en-US"),
	// 				PreferredTimeZone: to.Ptr("Pacific Standard Time"),
	// 				PrimaryEmailAddress: to.Ptr("test.name@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("Add or Edit VAT, TAX ID, or PO Number"),
	// 			ProblemClassificationID: to.Ptr("/providers/Microsoft.Support/services/subscription_management_service_guid/problemClassifications/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.SeverityLevelCritical),
	// 			Status: to.Ptr("Open"),
	// 			SupportEngineer: &armsupport.Engineer{
	// 				EmailAddress: to.Ptr("xyz@contoso.com"),
	// 			},
	// 			SupportPlanDisplayName: to.Ptr("Premier"),
	// 			SupportPlanID: to.Ptr("U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw="),
	// 			SupportPlanType: to.Ptr("Premier"),
	// 			SupportTicketID: to.Ptr("118032014183770"),
	// 			Title: to.Ptr("Test - please ignore"),
	// 		},
	// 	}
}
Output:

Example (UpdateSeverityOfASupportTicket)

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/UpdateSeverityOfSupportTicket.json

package main

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"
)

func main() {
	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)
	}
	res, err := clientFactory.NewTicketsNoSubscriptionClient().Update(ctx, "testticket", armsupport.UpdateSupportTicket{
		Severity: to.Ptr(armsupport.SeverityLevelCritical),
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %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("/providers/Microsoft.Support/supportTickets/testticket"),
	// 	Properties: &armsupport.TicketDetailsProperties{
	// 		Description: to.Ptr("This is a test - please ignore"),
	// 		AdvancedDiagnosticConsent: to.Ptr(armsupport.ConsentYes),
	// 		ContactDetails: &armsupport.ContactProfile{
	// 			AdditionalEmailAddresses: []*string{
	// 				to.Ptr("tname@contoso.com"),
	// 				to.Ptr("teamtest@contoso.com")},
	// 				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("test.name@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("Add or Edit VAT, TAX ID, or PO Number"),
	// 			ProblemClassificationID: to.Ptr("/providers/Microsoft.Support/services/subscription_management_service_guid/problemClassifications/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.SeverityLevelCritical),
	// 			Status: to.Ptr("Open"),
	// 			SupportEngineer: &armsupport.Engineer{
	// 				EmailAddress: to.Ptr("xyz@contoso.com"),
	// 			},
	// 			SupportPlanDisplayName: to.Ptr("Premier"),
	// 			SupportPlanID: to.Ptr("U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw="),
	// 			SupportPlanType: to.Ptr("Premier"),
	// 			SupportTicketID: to.Ptr("118032014183770"),
	// 			Title: to.Ptr("Test - please ignore"),
	// 		},
	// 	}
}
Output:

Example (UpdateStatusOfASupportTicket)

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/UpdateStatusOfSupportTicket.json

package main

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"
)

func main() {
	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)
	}
	res, err := clientFactory.NewTicketsNoSubscriptionClient().Update(ctx, "testticket", armsupport.UpdateSupportTicket{
		Status: to.Ptr(armsupport.StatusClosed),
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %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("/providers/Microsoft.Support/supportTickets/testticket"),
	// 	Properties: &armsupport.TicketDetailsProperties{
	// 		Description: to.Ptr("This is a test - please ignore"),
	// 		AdvancedDiagnosticConsent: to.Ptr(armsupport.ConsentYes),
	// 		ContactDetails: &armsupport.ContactProfile{
	// 			AdditionalEmailAddresses: []*string{
	// 				to.Ptr("tname@contoso.com"),
	// 				to.Ptr("teamtest@contoso.com")},
	// 				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("test.name@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("Add or Edit VAT, TAX ID, or PO Number"),
	// 			ProblemClassificationID: to.Ptr("/providers/Microsoft.Support/services/subscription_management_service_guid/problemClassifications/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.SeverityLevelCritical),
	// 			Status: to.Ptr("Closed"),
	// 			SupportEngineer: &armsupport.Engineer{
	// 			},
	// 			SupportPlanDisplayName: to.Ptr("Premier"),
	// 			SupportPlanID: to.Ptr("U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw="),
	// 			SupportPlanType: to.Ptr("Premier"),
	// 			SupportTicketID: to.Ptr("118032014183770"),
	// 			Title: to.Ptr("Test - please ignore"),
	// 		},
	// 	}
}
Output:

type TicketsNoSubscriptionClientBeginCreateOptions added in v1.3.0

type TicketsNoSubscriptionClientBeginCreateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

TicketsNoSubscriptionClientBeginCreateOptions contains the optional parameters for the TicketsNoSubscriptionClient.BeginCreate method.

type TicketsNoSubscriptionClientCheckNameAvailabilityOptions added in v1.3.0

type TicketsNoSubscriptionClientCheckNameAvailabilityOptions struct {
}

TicketsNoSubscriptionClientCheckNameAvailabilityOptions contains the optional parameters for the TicketsNoSubscriptionClient.CheckNameAvailability method.

type TicketsNoSubscriptionClientCheckNameAvailabilityResponse added in v1.3.0

type TicketsNoSubscriptionClientCheckNameAvailabilityResponse struct {
	// Output of check name availability API.
	CheckNameAvailabilityOutput
}

TicketsNoSubscriptionClientCheckNameAvailabilityResponse contains the response from method TicketsNoSubscriptionClient.CheckNameAvailability.

type TicketsNoSubscriptionClientCreateResponse added in v1.3.0

type TicketsNoSubscriptionClientCreateResponse struct {
	// Object that represents SupportTicketDetails resource.
	TicketDetails
}

TicketsNoSubscriptionClientCreateResponse contains the response from method TicketsNoSubscriptionClient.BeginCreate.

type TicketsNoSubscriptionClientGetOptions added in v1.3.0

type TicketsNoSubscriptionClientGetOptions struct {
}

TicketsNoSubscriptionClientGetOptions contains the optional parameters for the TicketsNoSubscriptionClient.Get method.

type TicketsNoSubscriptionClientGetResponse added in v1.3.0

type TicketsNoSubscriptionClientGetResponse struct {
	// Object that represents SupportTicketDetails resource.
	TicketDetails
}

TicketsNoSubscriptionClientGetResponse contains the response from method TicketsNoSubscriptionClient.Get.

type TicketsNoSubscriptionClientListOptions added in v1.3.0

type TicketsNoSubscriptionClientListOptions struct {
	// The filter to apply on the operation. We support 'odata v4.0' filter semantics. Learn more [https://docs.microsoft.com/odata/concepts/queryoptions-overview]
	// Status , ServiceId, and ProblemClassificationId filters can only be used with 'eq' operator. For CreatedDate filter, the
	// supported operators are 'gt' and 'ge'. When using both filters, combine them
	// using the logical 'AND'.
	Filter *string

	// The number of values to return in the collection. Default is 25 and max is 100.
	Top *int32
}

TicketsNoSubscriptionClientListOptions contains the optional parameters for the TicketsNoSubscriptionClient.NewListPager method.

type TicketsNoSubscriptionClientListResponse added in v1.3.0

type TicketsNoSubscriptionClientListResponse struct {
	// Object that represents a collection of SupportTicket resources.
	TicketsListResult
}

TicketsNoSubscriptionClientListResponse contains the response from method TicketsNoSubscriptionClient.NewListPager.

type TicketsNoSubscriptionClientUpdateOptions added in v1.3.0

type TicketsNoSubscriptionClientUpdateOptions struct {
}

TicketsNoSubscriptionClientUpdateOptions contains the optional parameters for the TicketsNoSubscriptionClient.Update method.

type TicketsNoSubscriptionClientUpdateResponse added in v1.3.0

type TicketsNoSubscriptionClientUpdateResponse struct {
	// Object that represents SupportTicketDetails resource.
	TicketDetails
}

TicketsNoSubscriptionClientUpdateResponse contains the response from method TicketsNoSubscriptionClient.Update.

type TranscriptContentType added in v1.3.0

type TranscriptContentType string

TranscriptContentType - Content type.

func PossibleTranscriptContentTypeValues added in v1.3.0

func PossibleTranscriptContentTypeValues() []TranscriptContentType

PossibleTranscriptContentTypeValues returns the possible values for the TranscriptContentType const type.

type Type

type Type string

Type - The type of resource.

const (
	TypeMicrosoftSupportCommunications Type = "Microsoft.Support/communications"
	TypeMicrosoftSupportSupportTickets Type = "Microsoft.Support/supportTickets"
)

func PossibleTypeValues

func PossibleTypeValues() []Type

PossibleTypeValues returns the possible values for the Type const type.

type UpdateContactProfile

type UpdateContactProfile struct {
	// Email addresses listed will be copied on any correspondence about the support ticket.
	AdditionalEmailAddresses []*string

	// Country of the user. This is the ISO 3166-1 alpha-3 code.
	Country *string

	// First name.
	FirstName *string

	// Last name.
	LastName *string

	// Phone number. This is required if preferred contact method is phone.
	PhoneNumber *string

	// Preferred contact method.
	PreferredContactMethod *PreferredContactMethod

	// Preferred language of support from Azure. Support languages vary based on the severity you choose for your support ticket.
	// Learn more at Azure Severity and responsiveness
	// [https://azure.microsoft.com/support/plans/response/]. Use the standard language-country code. Valid values are 'en-us'
	// for English, 'zh-hans' for Chinese, 'es-es' for Spanish, 'fr-fr' for French,
	// 'ja-jp' for Japanese, 'ko-kr' for Korean, 'ru-ru' for Russian, 'pt-br' for Portuguese, 'it-it' for Italian, 'zh-tw' for
	// Chinese and 'de-de' for German.
	PreferredSupportLanguage *string

	// Time zone of the user. This is the name of the time zone from Microsoft Time Zone Index Values [https://support.microsoft.com/help/973627/microsoft-time-zone-index-values].
	PreferredTimeZone *string

	// Primary email address.
	PrimaryEmailAddress *string
}

UpdateContactProfile - Contact information associated with the support ticket.

func (UpdateContactProfile) MarshalJSON

func (u UpdateContactProfile) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UpdateContactProfile.

func (*UpdateContactProfile) UnmarshalJSON added in v1.1.0

func (u *UpdateContactProfile) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type UpdateContactProfile.

type UpdateSupportTicket

type UpdateSupportTicket struct {
	// Advanced diagnostic consent to be updated on the support ticket.
	AdvancedDiagnosticConsent *Consent

	// Contact details to be updated on the support ticket.
	ContactDetails *UpdateContactProfile

	// This property indicates secondary consents for the support ticket
	SecondaryConsent []*SecondaryConsent

	// Severity level.
	Severity *SeverityLevel

	// Status to be updated on the ticket.
	Status *Status
}

UpdateSupportTicket - Updates severity, ticket status, contact details, advanced diagnostic consent and secondary consent in the support ticket.

func (UpdateSupportTicket) MarshalJSON

func (u UpdateSupportTicket) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UpdateSupportTicket.

func (*UpdateSupportTicket) UnmarshalJSON added in v1.1.0

func (u *UpdateSupportTicket) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type UpdateSupportTicket.

type UploadFile added in v1.3.0

type UploadFile struct {
	// Index of the uploaded chunk (Index starts at 0)
	ChunkIndex *int32

	// File Content in base64 encoded format
	Content *string
}

UploadFile - File content associated with the file under a workspace.

func (UploadFile) MarshalJSON added in v1.3.0

func (u UploadFile) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UploadFile.

func (*UploadFile) UnmarshalJSON added in v1.3.0

func (u *UploadFile) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type UploadFile.

type UserConsent added in v1.3.0

type UserConsent string

UserConsent - User consent value provided

const (
	UserConsentNo  UserConsent = "No"
	UserConsentYes UserConsent = "Yes"
)

func PossibleUserConsentValues added in v1.3.0

func PossibleUserConsentValues() []UserConsent

PossibleUserConsentValues returns the possible values for the UserConsent const type.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL