| 1: | <?php |
| 2: | |
| 3: | declare(strict_types=1); |
| 4: | |
| 5: | |
| 6: | |
| 7: | |
| 8: | |
| 9: | |
| 10: | |
| 11: | |
| 12: | |
| 13: | |
| 14: | |
| 15: | |
| 16: | namespace OpenSearch\Endpoints\Notifications; |
| 17: | |
| 18: | use OpenSearch\Endpoints\AbstractEndpoint; |
| 19: | |
| 20: | |
| 21: | |
| 22: | |
| 23: | class GetConfigs extends AbstractEndpoint |
| 24: | { |
| 25: | public function getURI(): string |
| 26: | { |
| 27: | return '/_plugins/_notifications/configs'; |
| 28: | } |
| 29: | |
| 30: | public function getParamWhitelist(): array |
| 31: | { |
| 32: | return [ |
| 33: | 'chime.url', |
| 34: | 'chime.url.keyword', |
| 35: | 'config_id', |
| 36: | 'config_id_list', |
| 37: | 'config_type', |
| 38: | 'created_time_ms', |
| 39: | 'description', |
| 40: | 'description.keyword', |
| 41: | 'email.email_account_id', |
| 42: | 'email.email_group_id_list', |
| 43: | 'email.recipient_list.recipient', |
| 44: | 'email.recipient_list.recipient.keyword', |
| 45: | 'email_group.recipient_list.recipient', |
| 46: | 'email_group.recipient_list.recipient.keyword', |
| 47: | 'is_enabled', |
| 48: | 'last_updated_time_ms', |
| 49: | 'microsoft_teams.url', |
| 50: | 'microsoft_teams.url.keyword', |
| 51: | 'name', |
| 52: | 'name.keyword', |
| 53: | 'query', |
| 54: | 'ses_account.from_address', |
| 55: | 'ses_account.from_address.keyword', |
| 56: | 'ses_account.region', |
| 57: | 'ses_account.role_arn', |
| 58: | 'ses_account.role_arn.keyword', |
| 59: | 'slack.url', |
| 60: | 'slack.url.keyword', |
| 61: | 'smtp_account.from_address', |
| 62: | 'smtp_account.from_address.keyword', |
| 63: | 'smtp_account.host', |
| 64: | 'smtp_account.host.keyword', |
| 65: | 'smtp_account.method', |
| 66: | 'sns.role_arn', |
| 67: | 'sns.role_arn.keyword', |
| 68: | 'sns.topic_arn', |
| 69: | 'sns.topic_arn.keyword', |
| 70: | 'text_query', |
| 71: | 'webhook.url', |
| 72: | 'webhook.url.keyword', |
| 73: | 'pretty', |
| 74: | 'human', |
| 75: | 'error_trace', |
| 76: | 'source', |
| 77: | 'filter_path' |
| 78: | ]; |
| 79: | } |
| 80: | |
| 81: | public function getMethod(): string |
| 82: | { |
| 83: | return 'GET'; |
| 84: | } |
| 85: | |
| 86: | public function setBody($body): static |
| 87: | { |
| 88: | if (is_null($body)) { |
| 89: | return $this; |
| 90: | } |
| 91: | $this->body = $body; |
| 92: | |
| 93: | return $this; |
| 94: | } |
| 95: | } |
| 96: | |