Adiciona um contato.
Experimente agora
Testar
Autorização RAM
|
Ação |
Nível de acesso |
Tipo de recurso |
Chave de condição |
Ação dependente |
|
resourcemanager:AddMessageContact |
create |
*MessageContact
|
Nenhuma | Nenhuma |
Parâmetros da solicitação
|
Parâmetro |
Tipo |
Obrigatório |
Descrição |
Exemplo |
| Name |
string |
Sim |
O nome do contato. O nome deve ser exclusivo no seu diretório de recursos. O nome deve ter de 2 a 12 caracteres e pode conter apenas letras. |
tom |
| EmailAddress |
string |
Sim |
O endereço de e-mail do contato. Após especificar um endereço de e-mail, você precisa chamar SendEmailVerificationForMessageContact para enviar informações de verificação para o endereço de e-mail. Após a verificação ser aprovada, o endereço de e-mail entra em vigor. |
someone***@example.com |
| PhoneNumber |
string |
Não |
O número de celular do contato. Especifique o número de celular no formato Nota
Somente números de celular no formato Após especificar um número de celular, você precisa chamar SendPhoneVerificationForMessageContact para enviar informações de verificação para o número de celular. Após a verificação ser aprovada, o número de celular entra em vigor. |
86-139****1234 |
| Title |
string |
Sim |
O cargo do contato. Valores válidos:
Valores válidos:
|
TechnicalDirector |
| MessageTypes |
array |
Sim |
Os tipos de mensagens recebidas pelo contato. |
|
|
string |
Não |
O tipo de mensagem recebida pelo contato. Valores válidos:
Valores válidos:
|
AccountExpenses |
Elementos de resposta
|
Elemento |
Tipo |
Descrição |
Exemplo |
|
object |
O resultado retornado. |
||
| RequestId |
string |
O ID da solicitação. |
2DFCE4C9-04A9-4C83-BB14-FE791275EC53 |
| Contact |
object |
As informações sobre o contato. |
|
| ContactId |
string |
O ID do contato. |
c-qL4HqKONzOM7**** |
| CreateDate |
string |
A hora em que o contato foi criado. |
2023-03-27 17:19:21 |
Exemplos
Resposta de sucesso
JSON formato
{
"RequestId": "2DFCE4C9-04A9-4C83-BB14-FE791275EC53",
"Contact": {
"ContactId": "c-qL4HqKONzOM7****",
"CreateDate": "2023-03-27 17:19:21"
}
}
Códigos de erro
|
Código de status HTTP |
Código de erro |
Mensagem de erro |
Descrição |
|---|---|---|---|
| 400 | MissingParameter.Name | You must specify Name. | You must specify Name. |
| 400 | InvalidParameter.Name | The Name is invalid. | The value of the Name parameter is invalid. The value can contain only letters. |
| 400 | InvalidParameter.Name.Length | The Name exceeds the length limit. | The length of the value specified for the Name parameter exceeds the upper limit. The value must be 2 to 12 characters in length and can contain only letters. |
| 400 | InvalidParameter.Name.AlreadyUsed | The Name already exists. Please change to another name. | The contact name already exists in the resource directory. Use another name. |
| 400 | MissingParameter.EmailAddress | You must specify EmailAddress. | The EmailAddress parameter is not configured. |
| 400 | InvalidParameter.EmailAddress | The EmailAddress is invalid. | The value of the EmailAddress parameter is invalid. |
| 400 | MissingParameter.PhoneNumber | You must specify PhoneNumber. | The PhoneNumber parameter is not configured. |
| 400 | InvalidParameter.PhoneNumber | The PhoneNumber is invalid. | The value of the PhoneNumber parameter is invalid. |
| 400 | MissingParameter.Title | You must specify Title. | The Title parameter is not configured. |
| 400 | InvalidParameter.Title | The Title is invalid. | The value of the Title parameter is invalid. |
| 400 | MissingParameter.MessageTypes | You must specify MessageTypes. | The MessageTypes parameter is not configured. |
| 400 | InvalidParameter.MessageTypes | The MessageTypes is invalid. | The value of the MessageTypes parameter is invalid. |
| 400 | LimitExceeded.Contacts | The maximum number of contacts in a resource directory exceeds the limit. | The number of contacts exceeds the upper limit. |
| 400 | InvalidParameter.MobileCountryCode | The current site does not support the country code. | |
| 400 | InvalidParameter.EmailAddress.Length | The EmailAddress exceeds the length limit. | The length of the value specified for the EmailAddress parameter exceeds the upper limit. |
| 429 | ConcurrentCallNotSupported | The operation conflicts with other operations. Please try again later. | The operation conflicts with other operations. Try again later. |
Consulte Códigos de Erro para uma lista completa.
Notas de versão
Consulte Notas de Versão para uma lista completa.