-
Notifications
You must be signed in to change notification settings - Fork 517
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CodeGen from PR 23714 in Azure/azure-rest-api-specs
Add new test notification APIs for Tenant Action Groups (#23714) * Initial changes/baseline * New changes for 2023-05-01-preview * Make the new api default * Fix build * Add regex name validation * name validation * Regex * Change type. * Fix typo * Change to v2 --------- Co-authored-by: Thomas Pham <[email protected]>
- Loading branch information
SDKAuto
and
Thomas Pham
committed
May 15, 2023
1 parent
ec38aad
commit 4e62758
Showing
2 changed files
with
328 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,325 @@ | ||
{ | ||
"id": "https://schema.management.azure.com/schemas/2023-05-01-preview/Microsoft.Insights.json#", | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"title": "Microsoft.Insights", | ||
"description": "Microsoft Insights Resource Types", | ||
"resourceDefinitions": {}, | ||
"managementGroup_resourceDefinitions": { | ||
"tenantActionGroups": { | ||
"type": "object", | ||
"properties": { | ||
"apiVersion": { | ||
"type": "string", | ||
"enum": [ | ||
"2023-05-01-preview" | ||
] | ||
}, | ||
"location": { | ||
"type": "string", | ||
"description": "Resource location" | ||
}, | ||
"name": { | ||
"oneOf": [ | ||
{ | ||
"type": "string", | ||
"pattern": "^[A-Za-z][A-Za-z0-9]*$", | ||
"minLength": 1, | ||
"maxLength": 260 | ||
}, | ||
{ | ||
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" | ||
} | ||
], | ||
"description": "The name of the action group." | ||
}, | ||
"properties": { | ||
"oneOf": [ | ||
{ | ||
"$ref": "#/definitions/TenantActionGroup" | ||
}, | ||
{ | ||
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" | ||
} | ||
], | ||
"description": "A tenant action group." | ||
}, | ||
"tags": { | ||
"oneOf": [ | ||
{ | ||
"type": "object", | ||
"additionalProperties": { | ||
"type": "string" | ||
}, | ||
"properties": {} | ||
}, | ||
{ | ||
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" | ||
} | ||
], | ||
"description": "Resource tags" | ||
}, | ||
"type": { | ||
"type": "string", | ||
"enum": [ | ||
"Microsoft.Insights/tenantActionGroups" | ||
] | ||
} | ||
}, | ||
"required": [ | ||
"apiVersion", | ||
"location", | ||
"name", | ||
"properties", | ||
"type" | ||
], | ||
"description": "Microsoft.Insights/tenantActionGroups" | ||
} | ||
}, | ||
"definitions": { | ||
"AzureAppPushReceiver": { | ||
"type": "object", | ||
"properties": { | ||
"emailAddress": { | ||
"type": "string", | ||
"description": "The email address registered for the Azure mobile app." | ||
}, | ||
"name": { | ||
"type": "string", | ||
"description": "The name of the Azure mobile app push receiver. Names must be unique across all receivers within a tenant action group." | ||
} | ||
}, | ||
"required": [ | ||
"emailAddress", | ||
"name" | ||
], | ||
"description": "The Azure mobile App push notification receiver." | ||
}, | ||
"EmailReceiver": { | ||
"type": "object", | ||
"properties": { | ||
"emailAddress": { | ||
"type": "string", | ||
"description": "The email address of this receiver." | ||
}, | ||
"name": { | ||
"type": "string", | ||
"description": "The name of the email receiver. Names must be unique across all receivers within a tenant action group." | ||
}, | ||
"useCommonAlertSchema": { | ||
"oneOf": [ | ||
{ | ||
"type": "boolean", | ||
"default": false | ||
}, | ||
{ | ||
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" | ||
} | ||
], | ||
"description": "Indicates whether to use common alert schema." | ||
} | ||
}, | ||
"required": [ | ||
"emailAddress", | ||
"name" | ||
], | ||
"description": "An email receiver." | ||
}, | ||
"SmsReceiver": { | ||
"type": "object", | ||
"properties": { | ||
"countryCode": { | ||
"type": "string", | ||
"description": "The country code of the SMS receiver." | ||
}, | ||
"name": { | ||
"type": "string", | ||
"description": "The name of the SMS receiver. Names must be unique across all receivers within a tenant action group." | ||
}, | ||
"phoneNumber": { | ||
"type": "string", | ||
"description": "The phone number of the SMS receiver." | ||
} | ||
}, | ||
"required": [ | ||
"countryCode", | ||
"name", | ||
"phoneNumber" | ||
], | ||
"description": "An SMS receiver." | ||
}, | ||
"TenantActionGroup": { | ||
"type": "object", | ||
"properties": { | ||
"azureAppPushReceivers": { | ||
"oneOf": [ | ||
{ | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/definitions/AzureAppPushReceiver" | ||
} | ||
}, | ||
{ | ||
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" | ||
} | ||
], | ||
"description": "The list of AzureAppPush receivers that are part of this tenant action group." | ||
}, | ||
"emailReceivers": { | ||
"oneOf": [ | ||
{ | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/definitions/EmailReceiver" | ||
} | ||
}, | ||
{ | ||
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" | ||
} | ||
], | ||
"description": "The list of email receivers that are part of this tenant action group." | ||
}, | ||
"enabled": { | ||
"oneOf": [ | ||
{ | ||
"type": "boolean", | ||
"default": true | ||
}, | ||
{ | ||
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" | ||
} | ||
], | ||
"description": "Indicates whether this tenant action group is enabled. If a tenant action group is not enabled, then none of its receivers will receive communications." | ||
}, | ||
"groupShortName": { | ||
"type": "string", | ||
"maxLength": 12, | ||
"description": "The short name of the action group. This will be used in SMS messages." | ||
}, | ||
"smsReceivers": { | ||
"oneOf": [ | ||
{ | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/definitions/SmsReceiver" | ||
} | ||
}, | ||
{ | ||
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" | ||
} | ||
], | ||
"description": "The list of SMS receivers that are part of this tenant action group." | ||
}, | ||
"voiceReceivers": { | ||
"oneOf": [ | ||
{ | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/definitions/VoiceReceiver" | ||
} | ||
}, | ||
{ | ||
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" | ||
} | ||
], | ||
"description": "The list of voice receivers that are part of this tenant action group." | ||
}, | ||
"webhookReceivers": { | ||
"oneOf": [ | ||
{ | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/definitions/WebhookReceiver" | ||
} | ||
}, | ||
{ | ||
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" | ||
} | ||
], | ||
"description": "The list of webhook receivers that are part of this tenant action group." | ||
} | ||
}, | ||
"required": [ | ||
"enabled", | ||
"groupShortName" | ||
], | ||
"description": "A tenant action group." | ||
}, | ||
"VoiceReceiver": { | ||
"type": "object", | ||
"properties": { | ||
"countryCode": { | ||
"type": "string", | ||
"description": "The country code of the voice receiver." | ||
}, | ||
"name": { | ||
"type": "string", | ||
"description": "The name of the voice receiver. Names must be unique across all receivers within a tenant action group." | ||
}, | ||
"phoneNumber": { | ||
"type": "string", | ||
"description": "The phone number of the voice receiver." | ||
} | ||
}, | ||
"required": [ | ||
"countryCode", | ||
"name", | ||
"phoneNumber" | ||
], | ||
"description": "A voice receiver." | ||
}, | ||
"WebhookReceiver": { | ||
"type": "object", | ||
"properties": { | ||
"identifierUri": { | ||
"type": "string", | ||
"description": "Indicates the identifier uri for aad auth." | ||
}, | ||
"name": { | ||
"type": "string", | ||
"description": "The name of the webhook receiver. Names must be unique across all receivers within a tenant action group." | ||
}, | ||
"objectId": { | ||
"type": "string", | ||
"description": "Indicates the webhook app object Id for aad auth." | ||
}, | ||
"serviceUri": { | ||
"type": "string", | ||
"description": "The URI where webhooks should be sent." | ||
}, | ||
"tenantId": { | ||
"type": "string", | ||
"description": "Indicates the tenant id for aad auth." | ||
}, | ||
"useAadAuth": { | ||
"oneOf": [ | ||
{ | ||
"type": "boolean", | ||
"default": false | ||
}, | ||
{ | ||
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" | ||
} | ||
], | ||
"description": "Indicates whether or not use AAD authentication." | ||
}, | ||
"useCommonAlertSchema": { | ||
"oneOf": [ | ||
{ | ||
"type": "boolean", | ||
"default": false | ||
}, | ||
{ | ||
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" | ||
} | ||
], | ||
"description": "Indicates whether to use common alert schema." | ||
} | ||
}, | ||
"required": [ | ||
"name", | ||
"serviceUri" | ||
], | ||
"description": "A webhook receiver." | ||
} | ||
} | ||
} |