armvoiceservices

package module
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2023 License: MIT Imports: 14 Imported by: 2

README

Azure VoiceServices Module for Go

PkgGoDev

The armvoiceservices module provides operations for working with Azure VoiceServices.

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 VoiceServices module:

go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/voiceservices/armvoiceservices

Authorization

When creating a client, you will need to provide a credential for authenticating with Azure VoiceServices. 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 VoiceServices 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 := armvoiceservices.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 := armvoiceservices.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.NewTestLinesClient()

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 VoiceServices 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 ActionType

type ActionType string

ActionType - Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.

const (
	ActionTypeInternal ActionType = "Internal"
)

func PossibleActionTypeValues

func PossibleActionTypeValues() []ActionType

PossibleActionTypeValues returns the possible values for the ActionType const type.

type AutoGeneratedDomainNameLabelScope added in v1.0.0

type AutoGeneratedDomainNameLabelScope string

AutoGeneratedDomainNameLabelScope - Available auto-generated domain name scopes.

const (
	AutoGeneratedDomainNameLabelScopeNoReuse            AutoGeneratedDomainNameLabelScope = "NoReuse"
	AutoGeneratedDomainNameLabelScopeResourceGroupReuse AutoGeneratedDomainNameLabelScope = "ResourceGroupReuse"
	AutoGeneratedDomainNameLabelScopeSubscriptionReuse  AutoGeneratedDomainNameLabelScope = "SubscriptionReuse"
	AutoGeneratedDomainNameLabelScopeTenantReuse        AutoGeneratedDomainNameLabelScope = "TenantReuse"
)

func PossibleAutoGeneratedDomainNameLabelScopeValues added in v1.0.0

func PossibleAutoGeneratedDomainNameLabelScopeValues() []AutoGeneratedDomainNameLabelScope

PossibleAutoGeneratedDomainNameLabelScopeValues returns the possible values for the AutoGeneratedDomainNameLabelScope const type.

type CheckNameAvailabilityReason added in v1.0.0

type CheckNameAvailabilityReason string

CheckNameAvailabilityReason - Possible reasons for a name not being available.

const (
	CheckNameAvailabilityReasonAlreadyExists CheckNameAvailabilityReason = "AlreadyExists"
	CheckNameAvailabilityReasonInvalid       CheckNameAvailabilityReason = "Invalid"
)

func PossibleCheckNameAvailabilityReasonValues added in v1.0.0

func PossibleCheckNameAvailabilityReasonValues() []CheckNameAvailabilityReason

PossibleCheckNameAvailabilityReasonValues returns the possible values for the CheckNameAvailabilityReason const type.

type CheckNameAvailabilityRequest added in v1.0.0

type CheckNameAvailabilityRequest struct {
	// The name of the resource for which availability needs to be checked.
	Name *string

	// The resource type.
	Type *string
}

CheckNameAvailabilityRequest - The check availability request body.

func (CheckNameAvailabilityRequest) MarshalJSON added in v1.0.0

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

MarshalJSON implements the json.Marshaller interface for type CheckNameAvailabilityRequest.

func (*CheckNameAvailabilityRequest) UnmarshalJSON added in v1.0.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type CheckNameAvailabilityRequest.

type CheckNameAvailabilityResponse added in v1.0.0

type CheckNameAvailabilityResponse struct {
	// Detailed reason why the given name is not available.
	Message *string

	// Indicates if the resource name is available.
	NameAvailable *bool

	// The reason why the given name is not available.
	Reason *CheckNameAvailabilityReason
}

CheckNameAvailabilityResponse - The check availability result.

func (CheckNameAvailabilityResponse) MarshalJSON added in v1.0.0

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

MarshalJSON implements the json.Marshaller interface for type CheckNameAvailabilityResponse.

func (*CheckNameAvailabilityResponse) UnmarshalJSON added in v1.0.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type CheckNameAvailabilityResponse.

type ClientFactory added in v1.0.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.0.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.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*ClientFactory) NewCommunicationsGatewaysClient added in v1.0.0

func (c *ClientFactory) NewCommunicationsGatewaysClient() *CommunicationsGatewaysClient

NewCommunicationsGatewaysClient creates a new instance of CommunicationsGatewaysClient.

func (*ClientFactory) NewNameAvailabilityClient added in v1.0.0

func (c *ClientFactory) NewNameAvailabilityClient() *NameAvailabilityClient

NewNameAvailabilityClient creates a new instance of NameAvailabilityClient.

func (*ClientFactory) NewOperationsClient added in v1.0.0

func (c *ClientFactory) NewOperationsClient() *OperationsClient

NewOperationsClient creates a new instance of OperationsClient.

func (*ClientFactory) NewTestLinesClient added in v1.0.0

func (c *ClientFactory) NewTestLinesClient() *TestLinesClient

NewTestLinesClient creates a new instance of TestLinesClient.

type CommunicationsGateway

type CommunicationsGateway struct {
	// REQUIRED; The geo-location where the resource lives
	Location *string

	// The resource-specific properties for this resource.
	Properties *CommunicationsGatewayProperties

	// Resource tags.
	Tags map[string]*string

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /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
}

CommunicationsGateway - A CommunicationsGateway resource

func (CommunicationsGateway) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type CommunicationsGateway.

func (*CommunicationsGateway) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type CommunicationsGateway.

type CommunicationsGatewayListResult

type CommunicationsGatewayListResult struct {
	// REQUIRED; The CommunicationsGateway items on this page
	Value []*CommunicationsGateway

	// The link to the next page of items
	NextLink *string
}

CommunicationsGatewayListResult - The response of a CommunicationsGateway list operation.

func (CommunicationsGatewayListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type CommunicationsGatewayListResult.

func (*CommunicationsGatewayListResult) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type CommunicationsGatewayListResult.

type CommunicationsGatewayProperties

type CommunicationsGatewayProperties struct {
	// REQUIRED; Voice codecs to support
	Codecs []*TeamsCodecs

	// REQUIRED; How to connect back to the operator network, e.g. MAPS
	Connectivity *Connectivity

	// REQUIRED; How to handle 911 calls
	E911Type *E911Type

	// REQUIRED; What platforms to support
	Platforms []*CommunicationsPlatform

	// REQUIRED; The regions in which to deploy the resources needed for Teams Calling
	ServiceLocations []*ServiceRegionProperties

	// Details of API bridge functionality, if required
	APIBridge any

	// The scope at which the auto-generated domain name can be re-used
	AutoGeneratedDomainNameLabelScope *AutoGeneratedDomainNameLabelScope

	// A list of dial strings used for emergency calling.
	EmergencyDialStrings []*string

	// Whether an on-premises Mobile Control Point is in use.
	OnPremMcpEnabled *bool

	// This number is used in Teams Phone Mobile scenarios for access to the voicemail IVR from the native dialer.
	TeamsVoicemailPilotNumber *string

	// READ-ONLY; The autogenerated label used as part of the FQDNs for accessing the Communications Gateway
	AutoGeneratedDomainNameLabel *string

	// READ-ONLY; Resource provisioning state.
	ProvisioningState *ProvisioningState

	// READ-ONLY; The current status of the deployment.
	Status *Status
}

CommunicationsGatewayProperties - Details of the CommunicationsGateway resource.

func (CommunicationsGatewayProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type CommunicationsGatewayProperties.

func (*CommunicationsGatewayProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type CommunicationsGatewayProperties.

type CommunicationsGatewayUpdate

type CommunicationsGatewayUpdate struct {
	// Resource tags.
	Tags map[string]*string
}

CommunicationsGatewayUpdate - The type used for update operations of the CommunicationsGateway.

func (CommunicationsGatewayUpdate) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type CommunicationsGatewayUpdate.

func (*CommunicationsGatewayUpdate) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type CommunicationsGatewayUpdate.

type CommunicationsGatewaysClient

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

CommunicationsGatewaysClient contains the methods for the CommunicationsGateways group. Don't use this type directly, use NewCommunicationsGatewaysClient() instead.

func NewCommunicationsGatewaysClient

func NewCommunicationsGatewaysClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CommunicationsGatewaysClient, error)

NewCommunicationsGatewaysClient creates a new instance of CommunicationsGatewaysClient with the specified values.

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

func (*CommunicationsGatewaysClient) BeginCreateOrUpdate

BeginCreateOrUpdate - Create a CommunicationsGateway If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-01-31

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • communicationsGatewayName - Unique identifier for this deployment
  • resource - Resource create parameters.
  • options - CommunicationsGatewaysClientBeginCreateOrUpdateOptions contains the optional parameters for the CommunicationsGatewaysClient.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aa85f59e259c4b12197b57b221067c40fa2fe3f1/specification/voiceservices/resource-manager/Microsoft.VoiceServices/stable/2023-01-31/examples/CommunicationsGateways_CreateOrUpdate.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/voiceservices/armvoiceservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armvoiceservices.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewCommunicationsGatewaysClient().BeginCreateOrUpdate(ctx, "testrg", "myname", armvoiceservices.CommunicationsGateway{
		Location: to.Ptr("useast"),
		Properties: &armvoiceservices.CommunicationsGatewayProperties{
			AutoGeneratedDomainNameLabelScope: to.Ptr(armvoiceservices.AutoGeneratedDomainNameLabelScopeNoReuse),
			Codecs: []*armvoiceservices.TeamsCodecs{
				to.Ptr(armvoiceservices.TeamsCodecsPCMA)},
			Connectivity: to.Ptr(armvoiceservices.ConnectivityPublicAddress),
			E911Type:     to.Ptr(armvoiceservices.E911TypeStandard),
			Platforms: []*armvoiceservices.CommunicationsPlatform{
				to.Ptr(armvoiceservices.CommunicationsPlatformOperatorConnect)},
			ServiceLocations: []*armvoiceservices.ServiceRegionProperties{
				{
					Name: to.Ptr("useast"),
					PrimaryRegionProperties: &armvoiceservices.PrimaryRegionProperties{
						AllowedMediaSourceAddressPrefixes: []*string{
							to.Ptr("10.1.2.0/24")},
						AllowedSignalingSourceAddressPrefixes: []*string{
							to.Ptr("10.1.1.0/24")},
						OperatorAddresses: []*string{
							to.Ptr("198.51.100.1")},
					},
				},
				{
					Name: to.Ptr("useast2"),
					PrimaryRegionProperties: &armvoiceservices.PrimaryRegionProperties{
						AllowedMediaSourceAddressPrefixes: []*string{
							to.Ptr("10.2.2.0/24")},
						AllowedSignalingSourceAddressPrefixes: []*string{
							to.Ptr("10.2.1.0/24")},
						OperatorAddresses: []*string{
							to.Ptr("198.51.100.2")},
					},
				}},
			TeamsVoicemailPilotNumber: to.Ptr("1234567890"),
		},
	}, 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.CommunicationsGateway = armvoiceservices.CommunicationsGateway{
	// 	Name: to.Ptr("myname"),
	// 	Type: to.Ptr("Microsoft.Voiceservice/communicationsGateways"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.VoiceService/communicationsGateway/myname"),
	// 	Location: to.Ptr("useast"),
	// 	Properties: &armvoiceservices.CommunicationsGatewayProperties{
	// 		AutoGeneratedDomainNameLabel: to.Ptr("somelabel"),
	// 		AutoGeneratedDomainNameLabelScope: to.Ptr(armvoiceservices.AutoGeneratedDomainNameLabelScopeNoReuse),
	// 		Codecs: []*armvoiceservices.TeamsCodecs{
	// 			to.Ptr(armvoiceservices.TeamsCodecsPCMA)},
	// 			Connectivity: to.Ptr(armvoiceservices.ConnectivityPublicAddress),
	// 			E911Type: to.Ptr(armvoiceservices.E911TypeStandard),
	// 			Platforms: []*armvoiceservices.CommunicationsPlatform{
	// 				to.Ptr(armvoiceservices.CommunicationsPlatformOperatorConnect)},
	// 				ServiceLocations: []*armvoiceservices.ServiceRegionProperties{
	// 					{
	// 						Name: to.Ptr("useast"),
	// 						PrimaryRegionProperties: &armvoiceservices.PrimaryRegionProperties{
	// 							AllowedMediaSourceAddressPrefixes: []*string{
	// 								to.Ptr("10.1.2.0/24")},
	// 								AllowedSignalingSourceAddressPrefixes: []*string{
	// 									to.Ptr("10.1.1.0/24")},
	// 									OperatorAddresses: []*string{
	// 										to.Ptr("198.51.100.1")},
	// 									},
	// 								},
	// 								{
	// 									Name: to.Ptr("useast2"),
	// 									PrimaryRegionProperties: &armvoiceservices.PrimaryRegionProperties{
	// 										AllowedMediaSourceAddressPrefixes: []*string{
	// 											to.Ptr("10.2.2.0/24")},
	// 											AllowedSignalingSourceAddressPrefixes: []*string{
	// 												to.Ptr("10.2.1.0/24")},
	// 												OperatorAddresses: []*string{
	// 													to.Ptr("198.51.100.2")},
	// 												},
	// 										}},
	// 										Status: to.Ptr(armvoiceservices.StatusChangePending),
	// 										TeamsVoicemailPilotNumber: to.Ptr("1234567890"),
	// 									},
	// 								}
}
Output:

func (*CommunicationsGatewaysClient) BeginDelete

BeginDelete - Delete a CommunicationsGateway If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-01-31

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • communicationsGatewayName - Unique identifier for this deployment
  • options - CommunicationsGatewaysClientBeginDeleteOptions contains the optional parameters for the CommunicationsGatewaysClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aa85f59e259c4b12197b57b221067c40fa2fe3f1/specification/voiceservices/resource-manager/Microsoft.VoiceServices/stable/2023-01-31/examples/CommunicationsGateways_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/voiceservices/armvoiceservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armvoiceservices.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewCommunicationsGatewaysClient().BeginDelete(ctx, "testrg", "myname", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*CommunicationsGatewaysClient) Get

func (client *CommunicationsGatewaysClient) Get(ctx context.Context, resourceGroupName string, communicationsGatewayName string, options *CommunicationsGatewaysClientGetOptions) (CommunicationsGatewaysClientGetResponse, error)

Get - Get a CommunicationsGateway If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-01-31

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • communicationsGatewayName - Unique identifier for this deployment
  • options - CommunicationsGatewaysClientGetOptions contains the optional parameters for the CommunicationsGatewaysClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aa85f59e259c4b12197b57b221067c40fa2fe3f1/specification/voiceservices/resource-manager/Microsoft.VoiceServices/stable/2023-01-31/examples/CommunicationsGateways_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/voiceservices/armvoiceservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armvoiceservices.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewCommunicationsGatewaysClient().Get(ctx, "testrg", "myname", 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.CommunicationsGateway = armvoiceservices.CommunicationsGateway{
	// 	Name: to.Ptr("myname"),
	// 	Type: to.Ptr("Microsoft.VoiceService/communicationsGateways"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.VoiceService/communicationsGateways/myname"),
	// 	Location: to.Ptr("useast"),
	// 	Properties: &armvoiceservices.CommunicationsGatewayProperties{
	// 		AutoGeneratedDomainNameLabel: to.Ptr("somelabel"),
	// 		AutoGeneratedDomainNameLabelScope: to.Ptr(armvoiceservices.AutoGeneratedDomainNameLabelScopeNoReuse),
	// 		Codecs: []*armvoiceservices.TeamsCodecs{
	// 			to.Ptr(armvoiceservices.TeamsCodecsPCMA)},
	// 			Connectivity: to.Ptr(armvoiceservices.ConnectivityPublicAddress),
	// 			E911Type: to.Ptr(armvoiceservices.E911TypeStandard),
	// 			Platforms: []*armvoiceservices.CommunicationsPlatform{
	// 				to.Ptr(armvoiceservices.CommunicationsPlatformOperatorConnect)},
	// 				ServiceLocations: []*armvoiceservices.ServiceRegionProperties{
	// 					{
	// 						Name: to.Ptr("useast"),
	// 						PrimaryRegionProperties: &armvoiceservices.PrimaryRegionProperties{
	// 							AllowedMediaSourceAddressPrefixes: []*string{
	// 								to.Ptr("10.1.2.0/24")},
	// 								AllowedSignalingSourceAddressPrefixes: []*string{
	// 									to.Ptr("10.1.1.0/24")},
	// 									OperatorAddresses: []*string{
	// 										to.Ptr("198.51.100.1")},
	// 									},
	// 								},
	// 								{
	// 									Name: to.Ptr("useast2"),
	// 									PrimaryRegionProperties: &armvoiceservices.PrimaryRegionProperties{
	// 										AllowedMediaSourceAddressPrefixes: []*string{
	// 											to.Ptr("10.2.2.0/24")},
	// 											AllowedSignalingSourceAddressPrefixes: []*string{
	// 												to.Ptr("10.2.1.0/24")},
	// 												OperatorAddresses: []*string{
	// 													to.Ptr("198.51.100.2")},
	// 												},
	// 										}},
	// 										Status: to.Ptr(armvoiceservices.StatusChangePending),
	// 										TeamsVoicemailPilotNumber: to.Ptr("1234567890"),
	// 									},
	// 								}
}
Output:

func (*CommunicationsGatewaysClient) NewListByResourceGroupPager

NewListByResourceGroupPager - List CommunicationsGateway resources by resource group

Generated from API version 2023-01-31

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • options - CommunicationsGatewaysClientListByResourceGroupOptions contains the optional parameters for the CommunicationsGatewaysClient.NewListByResourceGroupPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aa85f59e259c4b12197b57b221067c40fa2fe3f1/specification/voiceservices/resource-manager/Microsoft.VoiceServices/stable/2023-01-31/examples/CommunicationsGateways_ListByResourceGroup.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/voiceservices/armvoiceservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armvoiceservices.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewCommunicationsGatewaysClient().NewListByResourceGroupPager("testrg", 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.CommunicationsGatewayListResult = armvoiceservices.CommunicationsGatewayListResult{
		// 	Value: []*armvoiceservices.CommunicationsGateway{
		// 		{
		// 			Name: to.Ptr("myname"),
		// 			Type: to.Ptr("Microsoft.VoiceService/communicationsGateways"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.VoiceService/communicationsGateways/myname"),
		// 			Location: to.Ptr("useast"),
		// 			Properties: &armvoiceservices.CommunicationsGatewayProperties{
		// 				AutoGeneratedDomainNameLabel: to.Ptr("somelabel"),
		// 				AutoGeneratedDomainNameLabelScope: to.Ptr(armvoiceservices.AutoGeneratedDomainNameLabelScopeNoReuse),
		// 				Codecs: []*armvoiceservices.TeamsCodecs{
		// 					to.Ptr(armvoiceservices.TeamsCodecsPCMA)},
		// 					Connectivity: to.Ptr(armvoiceservices.ConnectivityPublicAddress),
		// 					E911Type: to.Ptr(armvoiceservices.E911TypeStandard),
		// 					Platforms: []*armvoiceservices.CommunicationsPlatform{
		// 						to.Ptr(armvoiceservices.CommunicationsPlatformOperatorConnect)},
		// 						ServiceLocations: []*armvoiceservices.ServiceRegionProperties{
		// 							{
		// 								Name: to.Ptr("useast"),
		// 								PrimaryRegionProperties: &armvoiceservices.PrimaryRegionProperties{
		// 									AllowedMediaSourceAddressPrefixes: []*string{
		// 										to.Ptr("10.1.2.0/24")},
		// 										AllowedSignalingSourceAddressPrefixes: []*string{
		// 											to.Ptr("10.1.1.0/24")},
		// 											OperatorAddresses: []*string{
		// 												to.Ptr("198.51.100.1")},
		// 											},
		// 										},
		// 										{
		// 											Name: to.Ptr("useast2"),
		// 											PrimaryRegionProperties: &armvoiceservices.PrimaryRegionProperties{
		// 												AllowedMediaSourceAddressPrefixes: []*string{
		// 													to.Ptr("10.2.2.0/24")},
		// 													AllowedSignalingSourceAddressPrefixes: []*string{
		// 														to.Ptr("10.2.1.0/24")},
		// 														OperatorAddresses: []*string{
		// 															to.Ptr("198.51.100.2")},
		// 														},
		// 												}},
		// 												Status: to.Ptr(armvoiceservices.StatusChangePending),
		// 												TeamsVoicemailPilotNumber: to.Ptr("1234567890"),
		// 											},
		// 									}},
		// 								}
	}
}
Output:

func (*CommunicationsGatewaysClient) NewListBySubscriptionPager

NewListBySubscriptionPager - List CommunicationsGateway resources by subscription ID

Generated from API version 2023-01-31

  • options - CommunicationsGatewaysClientListBySubscriptionOptions contains the optional parameters for the CommunicationsGatewaysClient.NewListBySubscriptionPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aa85f59e259c4b12197b57b221067c40fa2fe3f1/specification/voiceservices/resource-manager/Microsoft.VoiceServices/stable/2023-01-31/examples/CommunicationsGateways_ListBySubscription.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/voiceservices/armvoiceservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armvoiceservices.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewCommunicationsGatewaysClient().NewListBySubscriptionPager(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.CommunicationsGatewayListResult = armvoiceservices.CommunicationsGatewayListResult{
		// 	Value: []*armvoiceservices.CommunicationsGateway{
		// 		{
		// 			Name: to.Ptr("myname"),
		// 			Type: to.Ptr("Microsoft.VoiceService/communicationsGateways"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.VoiceService/communicationsGateways/myname"),
		// 			Location: to.Ptr("useast"),
		// 			Properties: &armvoiceservices.CommunicationsGatewayProperties{
		// 				AutoGeneratedDomainNameLabel: to.Ptr("somelabel"),
		// 				AutoGeneratedDomainNameLabelScope: to.Ptr(armvoiceservices.AutoGeneratedDomainNameLabelScopeNoReuse),
		// 				Codecs: []*armvoiceservices.TeamsCodecs{
		// 					to.Ptr(armvoiceservices.TeamsCodecsPCMA)},
		// 					Connectivity: to.Ptr(armvoiceservices.ConnectivityPublicAddress),
		// 					E911Type: to.Ptr(armvoiceservices.E911TypeStandard),
		// 					Platforms: []*armvoiceservices.CommunicationsPlatform{
		// 						to.Ptr(armvoiceservices.CommunicationsPlatformOperatorConnect)},
		// 						ServiceLocations: []*armvoiceservices.ServiceRegionProperties{
		// 							{
		// 								Name: to.Ptr("useast"),
		// 								PrimaryRegionProperties: &armvoiceservices.PrimaryRegionProperties{
		// 									AllowedMediaSourceAddressPrefixes: []*string{
		// 										to.Ptr("10.1.2.0/24")},
		// 										AllowedSignalingSourceAddressPrefixes: []*string{
		// 											to.Ptr("10.1.1.0/24")},
		// 											OperatorAddresses: []*string{
		// 												to.Ptr("198.51.100.1")},
		// 											},
		// 										},
		// 										{
		// 											Name: to.Ptr("useast2"),
		// 											PrimaryRegionProperties: &armvoiceservices.PrimaryRegionProperties{
		// 												AllowedMediaSourceAddressPrefixes: []*string{
		// 													to.Ptr("10.2.2.0/24")},
		// 													AllowedSignalingSourceAddressPrefixes: []*string{
		// 														to.Ptr("10.2.1.0/24")},
		// 														OperatorAddresses: []*string{
		// 															to.Ptr("198.51.100.2")},
		// 														},
		// 												}},
		// 												Status: to.Ptr(armvoiceservices.StatusChangePending),
		// 												TeamsVoicemailPilotNumber: to.Ptr("1234567890"),
		// 											},
		// 									}},
		// 								}
	}
}
Output:

func (*CommunicationsGatewaysClient) Update

Update - Update a CommunicationsGateway If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-01-31

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • communicationsGatewayName - Unique identifier for this deployment
  • properties - The resource properties to be updated.
  • options - CommunicationsGatewaysClientUpdateOptions contains the optional parameters for the CommunicationsGatewaysClient.Update method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aa85f59e259c4b12197b57b221067c40fa2fe3f1/specification/voiceservices/resource-manager/Microsoft.VoiceServices/stable/2023-01-31/examples/CommunicationsGateways_Update.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/voiceservices/armvoiceservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armvoiceservices.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewCommunicationsGatewaysClient().Update(ctx, "testrg", "myname", armvoiceservices.CommunicationsGatewayUpdate{}, 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.CommunicationsGateway = armvoiceservices.CommunicationsGateway{
	// 	Name: to.Ptr("myname"),
	// 	Type: to.Ptr("Microsoft.Voiceservice/communicationsGateways"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.VoiceService/communicationsGateway/myname"),
	// 	Location: to.Ptr("useast"),
	// 	Properties: &armvoiceservices.CommunicationsGatewayProperties{
	// 		AutoGeneratedDomainNameLabel: to.Ptr("somelabel"),
	// 		AutoGeneratedDomainNameLabelScope: to.Ptr(armvoiceservices.AutoGeneratedDomainNameLabelScopeNoReuse),
	// 		Codecs: []*armvoiceservices.TeamsCodecs{
	// 			to.Ptr(armvoiceservices.TeamsCodecsPCMA)},
	// 			Connectivity: to.Ptr(armvoiceservices.ConnectivityPublicAddress),
	// 			E911Type: to.Ptr(armvoiceservices.E911TypeStandard),
	// 			Platforms: []*armvoiceservices.CommunicationsPlatform{
	// 				to.Ptr(armvoiceservices.CommunicationsPlatformOperatorConnect)},
	// 				ServiceLocations: []*armvoiceservices.ServiceRegionProperties{
	// 					{
	// 						Name: to.Ptr("useast"),
	// 						PrimaryRegionProperties: &armvoiceservices.PrimaryRegionProperties{
	// 							AllowedMediaSourceAddressPrefixes: []*string{
	// 								to.Ptr("10.1.2.0/24")},
	// 								AllowedSignalingSourceAddressPrefixes: []*string{
	// 									to.Ptr("10.1.1.0/24")},
	// 									OperatorAddresses: []*string{
	// 										to.Ptr("198.51.100.1")},
	// 									},
	// 								},
	// 								{
	// 									Name: to.Ptr("useast2"),
	// 									PrimaryRegionProperties: &armvoiceservices.PrimaryRegionProperties{
	// 										AllowedMediaSourceAddressPrefixes: []*string{
	// 											to.Ptr("10.2.2.0/24")},
	// 											AllowedSignalingSourceAddressPrefixes: []*string{
	// 												to.Ptr("10.2.1.0/24")},
	// 												OperatorAddresses: []*string{
	// 													to.Ptr("198.51.100.2")},
	// 												},
	// 										}},
	// 										Status: to.Ptr(armvoiceservices.StatusChangePending),
	// 										TeamsVoicemailPilotNumber: to.Ptr("1234567890"),
	// 									},
	// 								}
}
Output:

type CommunicationsGatewaysClientBeginCreateOrUpdateOptions

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

CommunicationsGatewaysClientBeginCreateOrUpdateOptions contains the optional parameters for the CommunicationsGatewaysClient.BeginCreateOrUpdate method.

type CommunicationsGatewaysClientBeginDeleteOptions

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

CommunicationsGatewaysClientBeginDeleteOptions contains the optional parameters for the CommunicationsGatewaysClient.BeginDelete method.

type CommunicationsGatewaysClientCreateOrUpdateResponse

type CommunicationsGatewaysClientCreateOrUpdateResponse struct {
	// A CommunicationsGateway resource
	CommunicationsGateway
}

CommunicationsGatewaysClientCreateOrUpdateResponse contains the response from method CommunicationsGatewaysClient.BeginCreateOrUpdate.

type CommunicationsGatewaysClientDeleteResponse

type CommunicationsGatewaysClientDeleteResponse struct {
}

CommunicationsGatewaysClientDeleteResponse contains the response from method CommunicationsGatewaysClient.BeginDelete.

type CommunicationsGatewaysClientGetOptions

type CommunicationsGatewaysClientGetOptions struct {
}

CommunicationsGatewaysClientGetOptions contains the optional parameters for the CommunicationsGatewaysClient.Get method.

type CommunicationsGatewaysClientGetResponse

type CommunicationsGatewaysClientGetResponse struct {
	// A CommunicationsGateway resource
	CommunicationsGateway
}

CommunicationsGatewaysClientGetResponse contains the response from method CommunicationsGatewaysClient.Get.

type CommunicationsGatewaysClientListByResourceGroupOptions

type CommunicationsGatewaysClientListByResourceGroupOptions struct {
}

CommunicationsGatewaysClientListByResourceGroupOptions contains the optional parameters for the CommunicationsGatewaysClient.NewListByResourceGroupPager method.

type CommunicationsGatewaysClientListByResourceGroupResponse

type CommunicationsGatewaysClientListByResourceGroupResponse struct {
	// The response of a CommunicationsGateway list operation.
	CommunicationsGatewayListResult
}

CommunicationsGatewaysClientListByResourceGroupResponse contains the response from method CommunicationsGatewaysClient.NewListByResourceGroupPager.

type CommunicationsGatewaysClientListBySubscriptionOptions

type CommunicationsGatewaysClientListBySubscriptionOptions struct {
}

CommunicationsGatewaysClientListBySubscriptionOptions contains the optional parameters for the CommunicationsGatewaysClient.NewListBySubscriptionPager method.

type CommunicationsGatewaysClientListBySubscriptionResponse

type CommunicationsGatewaysClientListBySubscriptionResponse struct {
	// The response of a CommunicationsGateway list operation.
	CommunicationsGatewayListResult
}

CommunicationsGatewaysClientListBySubscriptionResponse contains the response from method CommunicationsGatewaysClient.NewListBySubscriptionPager.

type CommunicationsGatewaysClientUpdateOptions

type CommunicationsGatewaysClientUpdateOptions struct {
}

CommunicationsGatewaysClientUpdateOptions contains the optional parameters for the CommunicationsGatewaysClient.Update method.

type CommunicationsGatewaysClientUpdateResponse

type CommunicationsGatewaysClientUpdateResponse struct {
	// A CommunicationsGateway resource
	CommunicationsGateway
}

CommunicationsGatewaysClientUpdateResponse contains the response from method CommunicationsGatewaysClient.Update.

type CommunicationsPlatform

type CommunicationsPlatform string

CommunicationsPlatform - Available platform types.

const (
	CommunicationsPlatformOperatorConnect  CommunicationsPlatform = "OperatorConnect"
	CommunicationsPlatformTeamsPhoneMobile CommunicationsPlatform = "TeamsPhoneMobile"
)

func PossibleCommunicationsPlatformValues

func PossibleCommunicationsPlatformValues() []CommunicationsPlatform

PossibleCommunicationsPlatformValues returns the possible values for the CommunicationsPlatform const type.

type Connectivity

type Connectivity string

Connectivity - How this deployment connects back to the operator network

const (
	// ConnectivityPublicAddress - This deployment connects to the operator network using a Public IP address, e.g. when using
	// MAPS
	ConnectivityPublicAddress Connectivity = "PublicAddress"
)

func PossibleConnectivityValues

func PossibleConnectivityValues() []Connectivity

PossibleConnectivityValues returns the possible values for the Connectivity const type.

type CreatedByType

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

func PossibleCreatedByTypeValues() []CreatedByType

PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type.

type E911Type

type E911Type string

E911Type - The method for terminating emergency calls to the PSTN.

const (
	// E911TypeDirectToEsrp - Emergency calls are routed directly to the ESRP
	E911TypeDirectToEsrp E911Type = "DirectToEsrp"
	// E911TypeStandard - Emergency calls are not handled different from other calls
	E911TypeStandard E911Type = "Standard"
)

func PossibleE911TypeValues

func PossibleE911TypeValues() []E911Type

PossibleE911TypeValues returns the possible values for the E911Type const type.

type NameAvailabilityClient added in v1.0.0

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

NameAvailabilityClient contains the methods for the NameAvailability group. Don't use this type directly, use NewNameAvailabilityClient() instead.

func NewNameAvailabilityClient added in v1.0.0

func NewNameAvailabilityClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*NameAvailabilityClient, error)

NewNameAvailabilityClient creates a new instance of NameAvailabilityClient with the specified values.

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

func (*NameAvailabilityClient) CheckLocal added in v1.0.0

CheckLocal - Check whether the resource name is available in the given region. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-01-31

  • location - The location in which uniqueness will be verified.
  • body - The check availability request body.
  • options - NameAvailabilityClientCheckLocalOptions contains the optional parameters for the NameAvailabilityClient.CheckLocal method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aa85f59e259c4b12197b57b221067c40fa2fe3f1/specification/voiceservices/resource-manager/Microsoft.VoiceServices/stable/2023-01-31/examples/NameAvailability_CheckLocal.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/voiceservices/armvoiceservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armvoiceservices.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewNameAvailabilityClient().CheckLocal(ctx, "useast", armvoiceservices.CheckNameAvailabilityRequest{
		Name: to.Ptr("myname"),
		Type: to.Ptr("Microsoft.VoiceServices/CommunicationsGateway"),
	}, 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.CheckNameAvailabilityResponse = armvoiceservices.CheckNameAvailabilityResponse{
	// 	Message: to.Ptr("Some error string"),
	// 	NameAvailable: to.Ptr(false),
	// 	Reason: to.Ptr(armvoiceservices.CheckNameAvailabilityReasonAlreadyExists),
	// }
}
Output:

type NameAvailabilityClientCheckLocalOptions added in v1.0.0

type NameAvailabilityClientCheckLocalOptions struct {
}

NameAvailabilityClientCheckLocalOptions contains the optional parameters for the NameAvailabilityClient.CheckLocal method.

type NameAvailabilityClientCheckLocalResponse added in v1.0.0

type NameAvailabilityClientCheckLocalResponse struct {
	// The check availability result.
	CheckNameAvailabilityResponse
}

NameAvailabilityClientCheckLocalResponse contains the response from method NameAvailabilityClient.CheckLocal.

type Operation

type Operation struct {
	// Localized display information for this particular operation.
	Display *OperationDisplay

	// READ-ONLY; Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
	ActionType *ActionType

	// READ-ONLY; Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane
	// operations.
	IsDataAction *bool

	// READ-ONLY; The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write",
	// "Microsoft.Compute/virtualMachines/capture/action"
	Name *string

	// READ-ONLY; The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default
	// value is "user,system"
	Origin *Origin
}

Operation - Details of a REST API operation, returned from the Resource Provider Operations API

func (Operation) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type Operation.

func (*Operation) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type Operation.

type OperationDisplay

type OperationDisplay struct {
	// READ-ONLY; The short, localized friendly description of the operation; suitable for tool tips and detailed views.
	Description *string

	// READ-ONLY; The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual
	// Machine", "Restart Virtual Machine".
	Operation *string

	// READ-ONLY; The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft
	// Compute".
	Provider *string

	// READ-ONLY; The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job
	// Schedule Collections".
	Resource *string
}

OperationDisplay - Localized display information for this particular operation.

func (OperationDisplay) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type OperationDisplay.

func (*OperationDisplay) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplay.

type OperationListResult

type OperationListResult struct {
	// READ-ONLY; URL to get the next set of operation list results (if there are any).
	NextLink *string

	// READ-ONLY; List of operations supported by the resource provider
	Value []*Operation
}

OperationListResult - A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results.

func (OperationListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type OperationListResult.

func (*OperationListResult) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type OperationListResult.

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

NewListPager - List the operations for the provider

Generated from API version 2023-01-31

  • 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/aa85f59e259c4b12197b57b221067c40fa2fe3f1/specification/voiceservices/resource-manager/Microsoft.VoiceServices/stable/2023-01-31/examples/Operations_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/voiceservices/armvoiceservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armvoiceservices.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.OperationListResult = armvoiceservices.OperationListResult{
		// 	Value: []*armvoiceservices.Operation{
		// 		{
		// 			Name: to.Ptr("Microsoft.VoiceService/communicationsGateways/write"),
		// 			Display: &armvoiceservices.OperationDisplay{
		// 				Description: to.Ptr("Write communicationsGateways resource"),
		// 				Operation: to.Ptr("write"),
		// 				Provider: to.Ptr("Microsoft.VoiceService"),
		// 				Resource: to.Ptr("communicationsGateways"),
		// 			},
		// 	}},
		// }
	}
}
Output:

type OperationsClientListOptions

type OperationsClientListOptions struct {
}

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

type OperationsClientListResponse

type OperationsClientListResponse struct {
	// A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results.
	OperationListResult
}

OperationsClientListResponse contains the response from method OperationsClient.NewListPager.

type Origin

type Origin string

Origin - The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system"

const (
	OriginSystem     Origin = "system"
	OriginUser       Origin = "user"
	OriginUserSystem Origin = "user,system"
)

func PossibleOriginValues

func PossibleOriginValues() []Origin

PossibleOriginValues returns the possible values for the Origin const type.

type PrimaryRegionProperties

type PrimaryRegionProperties struct {
	// REQUIRED; IP address to use to contact the operator network from this region
	OperatorAddresses []*string

	// The allowed source IP address or CIDR ranges for media
	AllowedMediaSourceAddressPrefixes []*string

	// The allowed source IP address or CIDR ranges for signaling
	AllowedSignalingSourceAddressPrefixes []*string

	// IP address to use to contact the ESRP from this region
	EsrpAddresses []*string
}

PrimaryRegionProperties - The configuration used in this region as primary, and other regions as backup.

func (PrimaryRegionProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type PrimaryRegionProperties.

func (*PrimaryRegionProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type PrimaryRegionProperties.

type ProvisioningState

type ProvisioningState string

ProvisioningState - Provisioning state of the resource.

const (
	ProvisioningStateCanceled  ProvisioningState = "Canceled"
	ProvisioningStateFailed    ProvisioningState = "Failed"
	ProvisioningStateSucceeded ProvisioningState = "Succeeded"
)

func PossibleProvisioningStateValues

func PossibleProvisioningStateValues() []ProvisioningState

PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type.

type ServiceRegionProperties

type ServiceRegionProperties struct {
	// REQUIRED; The name of the region in which the resources needed for Teams Calling will be deployed.
	Name *string

	// REQUIRED; The configuration used in this region as primary, and other regions as backup.
	PrimaryRegionProperties *PrimaryRegionProperties
}

ServiceRegionProperties - The service region configuration needed for Teams Callings.

func (ServiceRegionProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ServiceRegionProperties.

func (*ServiceRegionProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ServiceRegionProperties.

type Status

type Status string

Status - The status of the current CommunicationsGateway resource.

const (
	// StatusChangePending - The resource has been created or updated, but the CommunicationsGateway service has not yet been
	// updated to reflect the changes.
	StatusChangePending Status = "ChangePending"
	// StatusComplete - The CommunicationsGateway service is up and running with the parameters specified in the resource.
	StatusComplete Status = "Complete"
)

func PossibleStatusValues

func PossibleStatusValues() []Status

PossibleStatusValues returns the possible values for the Status const type.

type SystemData

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

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

MarshalJSON implements the json.Marshaller interface for type SystemData.

func (*SystemData) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type SystemData.

type TeamsCodecs

type TeamsCodecs string

TeamsCodecs - The voice codecs expected for communication with Teams.

const (
	TeamsCodecsG722   TeamsCodecs = "G722"
	TeamsCodecsG7222  TeamsCodecs = "G722_2"
	TeamsCodecsPCMA   TeamsCodecs = "PCMA"
	TeamsCodecsPCMU   TeamsCodecs = "PCMU"
	TeamsCodecsSILK16 TeamsCodecs = "SILK_16"
	TeamsCodecsSILK8  TeamsCodecs = "SILK_8"
)

func PossibleTeamsCodecsValues

func PossibleTeamsCodecsValues() []TeamsCodecs

PossibleTeamsCodecsValues returns the possible values for the TeamsCodecs const type.

type TestLine

type TestLine struct {
	// REQUIRED; The geo-location where the resource lives
	Location *string

	// The resource-specific properties for this resource.
	Properties *TestLineProperties

	// Resource tags.
	Tags map[string]*string

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /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
}

TestLine - A TestLine resource

func (TestLine) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type TestLine.

func (*TestLine) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type TestLine.

type TestLineListResult

type TestLineListResult struct {
	// REQUIRED; The TestLine items on this page
	Value []*TestLine

	// The link to the next page of items
	NextLink *string
}

TestLineListResult - The response of a TestLine list operation.

func (TestLineListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type TestLineListResult.

func (*TestLineListResult) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type TestLineListResult.

type TestLineProperties

type TestLineProperties struct {
	// REQUIRED; The phone number
	PhoneNumber *string

	// REQUIRED; Purpose of this test line, e.g. automated or manual testing
	Purpose *TestLinePurpose

	// READ-ONLY; Resource provisioning state.
	ProvisioningState *ProvisioningState
}

TestLineProperties - Details of the TestLine resource.

func (TestLineProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type TestLineProperties.

func (*TestLineProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type TestLineProperties.

type TestLinePurpose

type TestLinePurpose string

TestLinePurpose - The purpose of the TestLine resource.

const (
	TestLinePurposeAutomated TestLinePurpose = "Automated"
	TestLinePurposeManual    TestLinePurpose = "Manual"
)

func PossibleTestLinePurposeValues

func PossibleTestLinePurposeValues() []TestLinePurpose

PossibleTestLinePurposeValues returns the possible values for the TestLinePurpose const type.

type TestLineUpdate

type TestLineUpdate struct {
	// Resource tags.
	Tags map[string]*string
}

TestLineUpdate - The type used for update operations of the TestLine.

func (TestLineUpdate) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type TestLineUpdate.

func (*TestLineUpdate) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type TestLineUpdate.

type TestLinesClient

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

TestLinesClient contains the methods for the TestLines group. Don't use this type directly, use NewTestLinesClient() instead.

func NewTestLinesClient

func NewTestLinesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*TestLinesClient, error)

NewTestLinesClient creates a new instance of TestLinesClient with the specified values.

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

func (*TestLinesClient) BeginCreateOrUpdate

func (client *TestLinesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, communicationsGatewayName string, testLineName string, resource TestLine, options *TestLinesClientBeginCreateOrUpdateOptions) (*runtime.Poller[TestLinesClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Create a TestLine If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-01-31

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • communicationsGatewayName - Unique identifier for this deployment
  • testLineName - Unique identifier for this test line
  • resource - Resource create parameters.
  • options - TestLinesClientBeginCreateOrUpdateOptions contains the optional parameters for the TestLinesClient.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aa85f59e259c4b12197b57b221067c40fa2fe3f1/specification/voiceservices/resource-manager/Microsoft.VoiceServices/stable/2023-01-31/examples/TestLines_CreateOrUpdate.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/voiceservices/armvoiceservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armvoiceservices.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewTestLinesClient().BeginCreateOrUpdate(ctx, "testrg", "myname", "myline", armvoiceservices.TestLine{
		Location: to.Ptr("useast"),
		Properties: &armvoiceservices.TestLineProperties{
			PhoneNumber: to.Ptr("+1-555-1234"),
			Purpose:     to.Ptr(armvoiceservices.TestLinePurposeAutomated),
		},
	}, 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.TestLine = armvoiceservices.TestLine{
	// 	Name: to.Ptr("myline"),
	// 	Type: to.Ptr("Microsoft.Voiceservice/communicationsGateways/testLines"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.VoiceService/communicationsGateway/myname/TestLines/myline"),
	// 	Location: to.Ptr("useast"),
	// 	Properties: &armvoiceservices.TestLineProperties{
	// 		PhoneNumber: to.Ptr("+1-555-1234"),
	// 		Purpose: to.Ptr(armvoiceservices.TestLinePurposeAutomated),
	// 	},
	// }
}
Output:

func (*TestLinesClient) BeginDelete

func (client *TestLinesClient) BeginDelete(ctx context.Context, resourceGroupName string, communicationsGatewayName string, testLineName string, options *TestLinesClientBeginDeleteOptions) (*runtime.Poller[TestLinesClientDeleteResponse], error)

BeginDelete - Delete a TestLine If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-01-31

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • communicationsGatewayName - Unique identifier for this deployment
  • testLineName - Unique identifier for this test line
  • options - TestLinesClientBeginDeleteOptions contains the optional parameters for the TestLinesClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aa85f59e259c4b12197b57b221067c40fa2fe3f1/specification/voiceservices/resource-manager/Microsoft.VoiceServices/stable/2023-01-31/examples/TestLines_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/voiceservices/armvoiceservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armvoiceservices.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewTestLinesClient().BeginDelete(ctx, "testrg", "myname", "myline", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*TestLinesClient) Get

func (client *TestLinesClient) Get(ctx context.Context, resourceGroupName string, communicationsGatewayName string, testLineName string, options *TestLinesClientGetOptions) (TestLinesClientGetResponse, error)

Get - Get a TestLine If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-01-31

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • communicationsGatewayName - Unique identifier for this deployment
  • testLineName - Unique identifier for this test line
  • options - TestLinesClientGetOptions contains the optional parameters for the TestLinesClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aa85f59e259c4b12197b57b221067c40fa2fe3f1/specification/voiceservices/resource-manager/Microsoft.VoiceServices/stable/2023-01-31/examples/TestLines_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/voiceservices/armvoiceservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armvoiceservices.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewTestLinesClient().Get(ctx, "testrg", "myname", "myline", 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.TestLine = armvoiceservices.TestLine{
	// 	Name: to.Ptr("myline"),
	// 	Type: to.Ptr("Microsoft.Voiceservice/communicationsGateways/testLines"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.VoiceService/communicationsGateway/myname/TestLines/myline"),
	// 	Location: to.Ptr("useast"),
	// 	Properties: &armvoiceservices.TestLineProperties{
	// 		PhoneNumber: to.Ptr("+1-555-1234"),
	// 		Purpose: to.Ptr(armvoiceservices.TestLinePurposeAutomated),
	// 	},
	// }
}
Output:

func (*TestLinesClient) NewListByCommunicationsGatewayPager

func (client *TestLinesClient) NewListByCommunicationsGatewayPager(resourceGroupName string, communicationsGatewayName string, options *TestLinesClientListByCommunicationsGatewayOptions) *runtime.Pager[TestLinesClientListByCommunicationsGatewayResponse]

NewListByCommunicationsGatewayPager - List TestLine resources by CommunicationsGateway

Generated from API version 2023-01-31

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • communicationsGatewayName - Unique identifier for this deployment
  • options - TestLinesClientListByCommunicationsGatewayOptions contains the optional parameters for the TestLinesClient.NewListByCommunicationsGatewayPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aa85f59e259c4b12197b57b221067c40fa2fe3f1/specification/voiceservices/resource-manager/Microsoft.VoiceServices/stable/2023-01-31/examples/TestLines_ListByCommunicationsGateway.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/voiceservices/armvoiceservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armvoiceservices.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewTestLinesClient().NewListByCommunicationsGatewayPager("testrg", "myname", 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.TestLineListResult = armvoiceservices.TestLineListResult{
		// 	Value: []*armvoiceservices.TestLine{
		// 		{
		// 			Name: to.Ptr("myline"),
		// 			Type: to.Ptr("Microsoft.Voiceservice/communicationsGateways/testLines"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.VoiceService/communicationsGateway/myname/TestLines/myline"),
		// 			Location: to.Ptr("useast"),
		// 			Properties: &armvoiceservices.TestLineProperties{
		// 				PhoneNumber: to.Ptr("+1-555-1234"),
		// 				Purpose: to.Ptr(armvoiceservices.TestLinePurposeAutomated),
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*TestLinesClient) Update

func (client *TestLinesClient) Update(ctx context.Context, resourceGroupName string, communicationsGatewayName string, testLineName string, properties TestLineUpdate, options *TestLinesClientUpdateOptions) (TestLinesClientUpdateResponse, error)

Update - Update a TestLine If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-01-31

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • communicationsGatewayName - Unique identifier for this deployment
  • testLineName - Unique identifier for this test line
  • properties - The resource properties to be updated.
  • options - TestLinesClientUpdateOptions contains the optional parameters for the TestLinesClient.Update method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/aa85f59e259c4b12197b57b221067c40fa2fe3f1/specification/voiceservices/resource-manager/Microsoft.VoiceServices/stable/2023-01-31/examples/TestLines_Update.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/voiceservices/armvoiceservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armvoiceservices.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewTestLinesClient().Update(ctx, "testrg", "myname", "myline", armvoiceservices.TestLineUpdate{}, 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.TestLine = armvoiceservices.TestLine{
	// 	Name: to.Ptr("myline"),
	// 	Type: to.Ptr("Microsoft.Voiceservice/communicationsGateways/testLines"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.VoiceService/communicationsGateway/myname/TestLines/myline"),
	// 	Location: to.Ptr("useast"),
	// 	Properties: &armvoiceservices.TestLineProperties{
	// 		PhoneNumber: to.Ptr("+1-555-1234"),
	// 		Purpose: to.Ptr(armvoiceservices.TestLinePurposeAutomated),
	// 	},
	// }
}
Output:

type TestLinesClientBeginCreateOrUpdateOptions

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

TestLinesClientBeginCreateOrUpdateOptions contains the optional parameters for the TestLinesClient.BeginCreateOrUpdate method.

type TestLinesClientBeginDeleteOptions

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

TestLinesClientBeginDeleteOptions contains the optional parameters for the TestLinesClient.BeginDelete method.

type TestLinesClientCreateOrUpdateResponse

type TestLinesClientCreateOrUpdateResponse struct {
	// A TestLine resource
	TestLine
}

TestLinesClientCreateOrUpdateResponse contains the response from method TestLinesClient.BeginCreateOrUpdate.

type TestLinesClientDeleteResponse

type TestLinesClientDeleteResponse struct {
}

TestLinesClientDeleteResponse contains the response from method TestLinesClient.BeginDelete.

type TestLinesClientGetOptions

type TestLinesClientGetOptions struct {
}

TestLinesClientGetOptions contains the optional parameters for the TestLinesClient.Get method.

type TestLinesClientGetResponse

type TestLinesClientGetResponse struct {
	// A TestLine resource
	TestLine
}

TestLinesClientGetResponse contains the response from method TestLinesClient.Get.

type TestLinesClientListByCommunicationsGatewayOptions

type TestLinesClientListByCommunicationsGatewayOptions struct {
}

TestLinesClientListByCommunicationsGatewayOptions contains the optional parameters for the TestLinesClient.NewListByCommunicationsGatewayPager method.

type TestLinesClientListByCommunicationsGatewayResponse

type TestLinesClientListByCommunicationsGatewayResponse struct {
	// The response of a TestLine list operation.
	TestLineListResult
}

TestLinesClientListByCommunicationsGatewayResponse contains the response from method TestLinesClient.NewListByCommunicationsGatewayPager.

type TestLinesClientUpdateOptions

type TestLinesClientUpdateOptions struct {
}

TestLinesClientUpdateOptions contains the optional parameters for the TestLinesClient.Update method.

type TestLinesClientUpdateResponse

type TestLinesClientUpdateResponse struct {
	// A TestLine resource
	TestLine
}

TestLinesClientUpdateResponse contains the response from method TestLinesClient.Update.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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