你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

MessageTemplateClient Class

  • java.lang.Object
    • com.azure.communication.messages.MessageTemplateClient

public final class MessageTemplateClient

Initializes a new instance of the synchronous MessageTemplateClient type.

Method Summary

Modifier and Type Method and Description
PagedIterable<MessageTemplateItem> listTemplates(String channelId)

List all templates for given Azure Communication Services channel.

PagedIterable<BinaryData> listTemplates(String channelId, RequestOptions requestOptions)

List all templates for given Azure Communication Services channel.

Methods inherited from java.lang.Object

Method Details

listTemplates

public PagedIterable listTemplates(String channelId)

List all templates for given Azure Communication Services channel.

Parameters:

channelId - The registration ID of the channel.

Returns:

paged collection of MessageTemplateItem items as paginated response with PagedIterable<T>.

listTemplates

public PagedIterable listTemplates(String channelId, RequestOptions requestOptions)

List all templates for given Azure Communication Services channel.

Query Parameters

| ----------- | ------- | -------- | ------------------------------------- |
| Name        | Type    | Required | Description                           |
| maxpagesize | Integer | No       | Number of objects to return per page. |

You can add these to a request with RequestOptions#addQueryParam

Response Body Schema

{
     kind: String(whatsApp) (Required)
     name: String (Required)
     language: String (Required)
     status: String(approved/rejected/pending/paused) (Required)
 }

Parameters:

channelId - The registration ID of the channel.
requestOptions - The options to configure the HTTP request before HTTP client sends it.

Returns:

paged collection of MessageTemplateItem items as paginated response with PagedIterable<T>.

Applies to