communication

package
v0.0.0-...-57c00fc Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2022 License: MIT Imports: 5 Imported by: 0

README


page_type: sample languages:

  • Go products:
  • azure description: "These code samples will show you how to manage Communication Service resources using Azure SDK for Go." urlFragment: communication

Getting started - Managing Azure Communication Services using Azure Go SDK

These code samples will show you how to manage Communication Service resources using Azure SDK for Go.

Features

This project framework provides examples for the following services:

Communication
  • Using the Azure SDK for Go - Communication Management Package github.com/Azure/azure-sdk-for-go/services/preview/communication/mgmt/2020-08-20-preview/communication for the Azure Communication API

Getting Started

See the document here to get started.

Demo

A test app is included to show how to use the creation API.

To run the complete test follow the instructions in the base of this repo.

The sample files do not have dependency each other and each file represents an individual end-to-end scenario. Please look at the sample that contains the scenario you are interested in.

Documentation

Overview

Example (CreateCommunicationService)

Example_createCommunicationService creates a group needed for a communication service, then creates a communication service.

groupName := config.GenerateGroupName("communication")
config.SetGroupName(groupName)

ctx, cancel := context.WithTimeout(context.Background(), 6000*time.Second)
defer cancel()
defer resources.Cleanup(ctx)

if _, err := resources.CreateGroup(ctx, groupName); err != nil {
	util.LogAndPanic(err)
}
util.PrintAndLog("created resource group")

if _, err := CreateCommunicationService(ctx, groupName, serviceName); err != nil {
	util.LogAndPanic(err)
}
util.PrintAndLog("created communication service")
Output:

created resource group
created communication service

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateCommunicationService

func CreateCommunicationService(ctx context.Context, resourceGroupName string, serviceName string) (service communication.ServiceResource, err error)

Create a ACS instance

func DeleteCommunicationServices

func DeleteCommunicationServices(ctx context.Context, resourceGroupName string, resourceName string) error

Delete an ACS instance

func GetCommunicationService

func GetCommunicationService(ctx context.Context, resourceGroupName string, resourceName string) (communication.ServiceResource, error)

Get resources

func GetManagementServiceClient

func GetManagementServiceClient() communication.ServiceClient

Create a CommunicationServiceManagementClient object using a Subscription ID

func GetOperationStatus

func GetOperationStatus(ctx context.Context, location string, operationID string) (communication.OperationStatus, error)

Get status of all operation

func GetOperationsStatusesClient

func GetOperationsStatusesClient() communication.OperationStatusesClient

func ListCommunicationServices

func ListCommunicationServices(ctx context.Context) (communication.ServiceResourceListIterator, error)

List all ACS instances

func ListCommunicationServicesByResourceGroupName

func ListCommunicationServicesByResourceGroupName(ctx context.Context, resourceGroupName string) (communication.ServiceResourceListIterator, error)

List all communication services in resource group

func ListKeys

func ListKeys(ctx context.Context, resourceGroupName string, communicationServiceName string) (communication.ServiceKeys, error)

List keys of ACS instance

func RegenerateKeys

func RegenerateKeys(ctx context.Context, resourceGroupName string, communicationServiceName string) (communication.ServiceKeys, error)

Regenerate key of ACS instance

func UpdateCommunicationService

func UpdateCommunicationService(ctx context.Context, resourceGroupName string, communicationServiceName string, tags map[string]*string) (communication.ServiceResource, error)

Update ACS instance tag

Types

This section is empty.

Jump to

Keyboard shortcuts

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