diff --git a/specification/monitor/resource-manager/Microsoft.Insights/preview/2023-05-01-preview/examples/createOrUpdateTenantActionGroup.json b/specification/monitor/resource-manager/Microsoft.Insights/preview/2023-05-01-preview/examples/createOrUpdateTenantActionGroup.json new file mode 100644 index 000000000000..42bedcb87370 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/preview/2023-05-01-preview/examples/createOrUpdateTenantActionGroup.json @@ -0,0 +1,201 @@ +{ + "parameters": { + "managementGroupId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "tenantActionGroupName": "testTenantActionGroup", + "api-version": "2023-05-01-preview", + "x-ms-client-tenant-id": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "actionGroup": { + "location": "Global", + "tags": {}, + "properties": { + "groupShortName": "sample", + "enabled": true, + "emailReceivers": [ + { + "name": "John Doe's email", + "emailAddress": "johndoe@email.com", + "useCommonAlertSchema": false + }, + { + "name": "Jane Smith's email", + "emailAddress": "janesmith@email.com", + "useCommonAlertSchema": true + } + ], + "smsReceivers": [ + { + "name": "John Doe's mobile", + "countryCode": "1", + "phoneNumber": "2062022299" + }, + { + "name": "Jane Smith's mobile", + "countryCode": "1", + "phoneNumber": "0987654321" + } + ], + "webhookReceivers": [ + { + "name": "Sample webhook 1", + "serviceUri": "http://www.example.com/webhook1", + "useCommonAlertSchema": true + }, + { + "name": "Sample webhook 2", + "serviceUri": "http://www.example.com/webhook2", + "useCommonAlertSchema": true, + "useAadAuth": true, + "objectId": "d3bb868c-fe44-452c-aa26-769a6538c808", + "identifierUri": "http://someidentifier/d7811ba3-7996-4a93-99b6-6b2f3f355f8a", + "tenantId": "68a4459a-ccb8-493c-b9da-dd30457d1b84" + } + ], + "azureAppPushReceivers": [ + { + "name": "Sample azureAppPush", + "emailAddress": "johndoe@email.com" + } + ], + "voiceReceivers": [ + { + "name": "Sample voice", + "countryCode": "1", + "phoneNumber": "2062022299" + } + ] + } + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "id": "/providers/Microsoft.Management/managementGroups/72f988bf-86f1-41af-91ab-2d7cd011db47/providers/Microsoft.Insights/tenantActionGroups/testTenantActionGroup", + "type": "Microsoft.Insights/TenantActionGroups", + "name": "testTenantActionGroup", + "location": "Global", + "tags": {}, + "properties": { + "groupShortName": "sample", + "enabled": true, + "emailReceivers": [ + { + "name": "John Doe's email", + "emailAddress": "johndoe@email.com", + "status": "Enabled", + "useCommonAlertSchema": false + }, + { + "name": "Jane Smith's email", + "emailAddress": "janesmith@email.com", + "status": "Enabled", + "useCommonAlertSchema": true + } + ], + "smsReceivers": [ + { + "name": "John Doe's mobile", + "countryCode": "1", + "phoneNumber": "2062022299", + "status": "Enabled" + }, + { + "name": "Jane Smith's mobile", + "countryCode": "1", + "phoneNumber": "0987654321", + "status": "Enabled" + } + ], + "webhookReceivers": [ + { + "name": "Sample webhook 1", + "serviceUri": "http://www.example.com/webhook1", + "useCommonAlertSchema": true + }, + { + "name": "Sample webhook 2", + "serviceUri": "http://www.example.com/webhook2", + "useCommonAlertSchema": true, + "useAadAuth": true, + "objectId": "d3bb868c-fe44-452c-aa26-769a6538c808", + "identifierUri": "http://someidentifier/d7811ba3-7996-4a93-99b6-6b2f3f355f8a", + "tenantId": "68a4459a-ccb8-493c-b9da-dd30457d1b84" + } + ], + "voiceReceivers": [ + { + "name": "Sample voice", + "countryCode": "1", + "phoneNumber": "2062022299" + } + ] + } + } + }, + "201": { + "headers": {}, + "body": { + "id": "/providers/Microsoft.Management/managementGroups/72f988bf-86f1-41af-91ab-2d7cd011db47/providers/Microsoft.Insights/tenantActionGroups/testTenantActionGroup", + "type": "Microsoft.Insights/TenantActionGroups", + "name": "testTenantActionGroup", + "location": "Global", + "tags": {}, + "properties": { + "groupShortName": "sample", + "enabled": true, + "emailReceivers": [ + { + "name": "John Doe's email", + "emailAddress": "johndoe@email.com", + "status": "Enabled", + "useCommonAlertSchema": false + }, + { + "name": "Jane Smith's email", + "emailAddress": "janesmith@email.com", + "status": "Enabled", + "useCommonAlertSchema": true + } + ], + "smsReceivers": [ + { + "name": "John Doe's mobile", + "countryCode": "1", + "phoneNumber": "2062022299", + "status": "Enabled" + }, + { + "name": "Jane Smith's mobile", + "countryCode": "1", + "phoneNumber": "0987654321", + "status": "Enabled" + } + ], + "webhookReceivers": [ + { + "name": "Sample webhook 1", + "serviceUri": "http://www.example.com/webhook1", + "useCommonAlertSchema": true + }, + { + "name": "Sample webhook 2", + "serviceUri": "http://www.example.com/webhook2", + "useCommonAlertSchema": true, + "useAadAuth": true, + "objectId": "d3bb868c-fe44-452c-aa26-769a6538c808", + "identifierUri": "http://someidentifier/d7811ba3-7996-4a93-99b6-6b2f3f355f8a", + "tenantId": "68a4459a-ccb8-493c-b9da-dd30457d1b84" + } + ], + "voiceReceivers": [ + { + "name": "Sample voice", + "countryCode": "1", + "phoneNumber": "2062022299" + } + ] + } + } + } + } +} diff --git a/specification/monitor/resource-manager/Microsoft.Insights/preview/2023-05-01-preview/examples/deleteTenantActionGroup.json b/specification/monitor/resource-manager/Microsoft.Insights/preview/2023-05-01-preview/examples/deleteTenantActionGroup.json new file mode 100644 index 000000000000..3de00a2123cd --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/preview/2023-05-01-preview/examples/deleteTenantActionGroup.json @@ -0,0 +1,12 @@ +{ + "parameters": { + "managementGroupId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "tenantActionGroupName": "testTenantActionGroup", + "api-version": "2023-05-01-preview", + "x-ms-client-tenant-id": "72f988bf-86f1-41af-91ab-2d7cd011db47" + }, + "responses": { + "200": {}, + "204": {} + } +} diff --git a/specification/monitor/resource-manager/Microsoft.Insights/preview/2023-05-01-preview/examples/getTenantActionGroup.json b/specification/monitor/resource-manager/Microsoft.Insights/preview/2023-05-01-preview/examples/getTenantActionGroup.json new file mode 100644 index 000000000000..8f34caadf97b --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/preview/2023-05-01-preview/examples/getTenantActionGroup.json @@ -0,0 +1,75 @@ +{ + "parameters": { + "managementGroupId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "tenantActionGroupName": "testTenantActionGroup", + "api-version": "2023-05-01-preview", + "x-ms-client-tenant-id": "72f988bf-86f1-41af-91ab-2d7cd011db47" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "id": "/providers/Microsoft.Management/managementGroups/72f988bf-86f1-41af-91ab-2d7cd011db47/providers/Microsoft.Insights/tenantActionGroups/testTenantActionGroup", + "type": "Microsoft.Insights/TenantActionGroups", + "name": "testTenantActionGroup", + "location": "Global", + "tags": {}, + "properties": { + "groupShortName": "sample", + "enabled": true, + "emailReceivers": [ + { + "name": "John Doe's email", + "emailAddress": "johndoe@email.com", + "status": "Enabled", + "useCommonAlertSchema": false + }, + { + "name": "Jane Smith's email", + "emailAddress": "janesmith@email.com", + "status": "Enabled", + "useCommonAlertSchema": true + } + ], + "smsReceivers": [ + { + "name": "John Doe's mobile", + "countryCode": "1", + "phoneNumber": "2062022299", + "status": "Enabled" + }, + { + "name": "Jane Smith's mobile", + "countryCode": "1", + "phoneNumber": "0987654321", + "status": "Enabled" + } + ], + "webhookReceivers": [ + { + "name": "Sample webhook 1", + "serviceUri": "http://www.example.com/webhook1", + "useCommonAlertSchema": true + }, + { + "name": "Sample webhook 2", + "serviceUri": "http://www.example.com/webhook2", + "useCommonAlertSchema": true, + "useAadAuth": true, + "objectId": "d3bb868c-fe44-452c-aa26-769a6538c808", + "identifierUri": "http://someidentifier/d7811ba3-7996-4a93-99b6-6b2f3f355f8a", + "tenantId": "68a4459a-ccb8-493c-b9da-dd30457d1b84" + } + ], + "voiceReceivers": [ + { + "name": "Sample voice", + "countryCode": "1", + "phoneNumber": "2062022299" + } + ] + } + } + } + } +} diff --git a/specification/monitor/resource-manager/Microsoft.Insights/preview/2023-05-01-preview/examples/getTestNotificationsAtTenantActionGroupResourceLevel.json b/specification/monitor/resource-manager/Microsoft.Insights/preview/2023-05-01-preview/examples/getTestNotificationsAtTenantActionGroupResourceLevel.json new file mode 100644 index 000000000000..2ab8f678d25e --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/preview/2023-05-01-preview/examples/getTestNotificationsAtTenantActionGroupResourceLevel.json @@ -0,0 +1,73 @@ +{ + "parameters": { + "managementGroupId": "11111111-1111-1111-1111-111111111111", + "tenantActionGroupName": "testTenantActionGroup", + "x-ms-client-tenant-id": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "notificationId": "11000222191287", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "context": { + "notificationSource": "Microsoft.Insights/TestNotification", + "contextType": "Microsoft.Insights/ServiceHealth" + }, + "state": "Completed", + "completedTime": "0001-01-01T00:00:00+00:00", + "createdTime": "2021-09-21T04:52:29.5091168+00:00", + "actionDetails": [ + { + "mechanismType": "AzureAppPush", + "name": "AzureAppPush-name", + "status": "Completed", + "subState": "Default", + "sendTime": "2021-09-21T04:52:42.8620629+00:00", + "message": null + }, + { + "mechanismType": "Email", + "name": "Email-name", + "status": "Completed", + "subState": "Default", + "sendTime": "2021-09-21T04:52:40.7480368+00:00", + "message": null + }, + { + "mechanismType": "Webhook", + "name": "Webhook-name", + "status": "Completed", + "subState": "Default", + "sendTime": "2021-09-21T04:52:42.0723479+00:00", + "message": null + }, + { + "mechanismType": "SecureWebhook", + "name": "SecureWebhook-name", + "status": "Completed", + "subState": "Default", + "sendTime": "2021-09-21T04:52:42.0723479+00:00", + "message": null + }, + { + "mechanismType": "Sms", + "name": "Sms-name", + "status": "Completed", + "subState": "Default", + "sendTime": "2021-09-21T04:52:41.353015+00:00", + "message": null + }, + { + "mechanismType": "Voice", + "name": "Voice-name", + "status": "Completed", + "subState": "Default", + "sendTime": "2021-09-21T04:52:41.6330734+00:00", + "message": null + } + ] + } + } + } +} diff --git a/specification/monitor/resource-manager/Microsoft.Insights/preview/2023-05-01-preview/examples/listTenantActionGroups.json b/specification/monitor/resource-manager/Microsoft.Insights/preview/2023-05-01-preview/examples/listTenantActionGroups.json new file mode 100644 index 000000000000..5fd2c6723c4a --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/preview/2023-05-01-preview/examples/listTenantActionGroups.json @@ -0,0 +1,78 @@ +{ + "parameters": { + "managementGroupId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "api-version": "2023-05-01-preview", + "x-ms-client-tenant-id": "72f988bf-86f1-41af-91ab-2d7cd011db47" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "value": [ + { + "id": "/providers/Microsoft.Management/managementGroups/72f988bf-86f1-41af-91ab-2d7cd011db47/providers/Microsoft.Insights/tenantActionGroups/testTenantActionGroup", + "type": "Microsoft.Insights/TenantActionGroups", + "name": "testTenantActionGroup", + "location": "Global", + "tags": {}, + "properties": { + "groupShortName": "sample", + "enabled": true, + "emailReceivers": [ + { + "name": "John Doe's email", + "emailAddress": "johndoe@email.com", + "status": "Enabled", + "useCommonAlertSchema": false + }, + { + "name": "Jane Smith's email", + "emailAddress": "janesmith@email.com", + "status": "Enabled", + "useCommonAlertSchema": true + } + ], + "smsReceivers": [ + { + "name": "John Doe's mobile", + "countryCode": "1", + "phoneNumber": "2062022299", + "status": "Enabled" + }, + { + "name": "Jane Smith's mobile", + "countryCode": "1", + "phoneNumber": "0987654321", + "status": "Enabled" + } + ], + "webhookReceivers": [ + { + "name": "Sample webhook 1", + "serviceUri": "http://www.example.com/webhook1", + "useCommonAlertSchema": true + }, + { + "name": "Sample webhook 2", + "serviceUri": "http://www.example.com/webhook2", + "useCommonAlertSchema": true, + "useAadAuth": true, + "objectId": "d3bb868c-fe44-452c-aa26-769a6538c808", + "identifierUri": "http://someidentifier/d7811ba3-7996-4a93-99b6-6b2f3f355f8a", + "tenantId": "68a4459a-ccb8-493c-b9da-dd30457d1b84" + } + ], + "voiceReceivers": [ + { + "name": "Sample voice", + "countryCode": "1", + "phoneNumber": "2062022299" + } + ] + } + } + ] + } + } + } +} diff --git a/specification/monitor/resource-manager/Microsoft.Insights/preview/2023-05-01-preview/examples/patchTenantActionGroup.json b/specification/monitor/resource-manager/Microsoft.Insights/preview/2023-05-01-preview/examples/patchTenantActionGroup.json new file mode 100644 index 000000000000..aaf89ba42b8c --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/preview/2023-05-01-preview/examples/patchTenantActionGroup.json @@ -0,0 +1,87 @@ +{ + "parameters": { + "managementGroupId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "tenantActionGroupName": "testTenantActionGroup", + "api-version": "2023-05-01-preview", + "x-ms-client-tenant-id": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "tenantActionGroupPatch": { + "tags": { + "key1": "value1", + "key2": "value2" + }, + "properties": { + "enabled": false + } + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "id": "/providers/Microsoft.Management/managementGroups/72f988bf-86f1-41af-91ab-2d7cd011db47/providers/Microsoft.Insights/tenantActionGroups/testTenantActionGroup", + "type": "Microsoft.Insights/TenantActionGroups", + "name": "testTenantActionGroup", + "location": "Global", + "tags": { + "key1": "value1", + "key2": "value2" + }, + "properties": { + "groupShortName": "sample", + "enabled": false, + "emailReceivers": [ + { + "name": "John Doe's email", + "emailAddress": "johndoe@email.com", + "status": "Enabled", + "useCommonAlertSchema": false + }, + { + "name": "Jane Smith's email", + "emailAddress": "janesmith@email.com", + "status": "Enabled", + "useCommonAlertSchema": true + } + ], + "smsReceivers": [ + { + "name": "John Doe's mobile", + "countryCode": "1", + "phoneNumber": "2062022299", + "status": "Enabled" + }, + { + "name": "Jane Smith's mobile", + "countryCode": "1", + "phoneNumber": "0987654321", + "status": "Enabled" + } + ], + "webhookReceivers": [ + { + "name": "Sample webhook 1", + "serviceUri": "http://www.example.com/webhook1", + "useCommonAlertSchema": true + }, + { + "name": "Sample webhook 2", + "serviceUri": "http://www.example.com/webhook2", + "useCommonAlertSchema": true, + "useAadAuth": true, + "objectId": "d3bb868c-fe44-452c-aa26-769a6538c808", + "identifierUri": "http://someidentifier/d7811ba3-7996-4a93-99b6-6b2f3f355f8a", + "tenantId": "68a4459a-ccb8-493c-b9da-dd30457d1b84" + } + ], + "voiceReceivers": [ + { + "name": "Sample voice", + "countryCode": "1", + "phoneNumber": "2062022299" + } + ] + } + } + } + } +} diff --git a/specification/monitor/resource-manager/Microsoft.Insights/preview/2023-05-01-preview/examples/postTestNotificationsAtTenantActionGroupResourceLevel.json b/specification/monitor/resource-manager/Microsoft.Insights/preview/2023-05-01-preview/examples/postTestNotificationsAtTenantActionGroupResourceLevel.json new file mode 100644 index 000000000000..34e82bc7e202 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/preview/2023-05-01-preview/examples/postTestNotificationsAtTenantActionGroupResourceLevel.json @@ -0,0 +1,133 @@ +{ + "parameters": { + "managementGroupId": "11111111-1111-1111-1111-111111111111", + "tenantActionGroupName": "testTenantActionGroup", + "x-ms-client-tenant-id": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "api-version": "2023-05-01-preview", + "notificationRequest": { + "alertType": "servicehealth", + "emailReceivers": [ + { + "name": "John Doe's email", + "emailAddress": "johndoe@email.com", + "useCommonAlertSchema": false + }, + { + "name": "Jane Smith's email", + "emailAddress": "janesmith@email.com", + "useCommonAlertSchema": true + } + ], + "smsReceivers": [ + { + "name": "John Doe's mobile", + "countryCode": "1", + "phoneNumber": "1234567890" + }, + { + "name": "Jane Smith's mobile", + "countryCode": "1", + "phoneNumber": "0987654321" + } + ], + "webhookReceivers": [ + { + "name": "Sample webhook 1", + "serviceUri": "http://www.example.com/webhook1", + "useCommonAlertSchema": true + }, + { + "name": "Sample webhook 2", + "serviceUri": "http://www.example.com/webhook2", + "useCommonAlertSchema": true, + "useAadAuth": true, + "objectId": "d3bb868c-fe44-452c-aa26-769a6538c808", + "identifierUri": "http://someidentifier/d7811ba3-7996-4a93-99b6-6b2f3f355f8a", + "tenantId": "68a4459a-ccb8-493c-b9da-dd30457d1b84" + } + ], + "azureAppPushReceivers": [ + { + "name": "Sample azureAppPush", + "emailAddress": "johndoe@email.com" + } + ], + "voiceReceivers": [ + { + "name": "Sample voice", + "countryCode": "1", + "phoneNumber": "1234567890" + } + ] + } + }, + "responses": { + "202": { + "headers": { + "location": "https://management.azure.com/providers/microsoft.management/managementGroups/11111111-1111-1111-1111-111111111111/providers/microsoft.insights/tenantActionGroups/testTenantActionGroup/notificationStatus/11001810058463?api-version=2023-05-01-preview" + } + }, + "200": { + "headers": {}, + "body": { + "context": { + "notificationSource": "Microsoft.Insights/TestNotification", + "contextType": "Microsoft.Insights/ServiceHealth" + }, + "state": "Completed", + "completedTime": "0001-01-01T00:00:00+00:00", + "createdTime": "2021-09-21T04:52:29.5091168+00:00", + "actionDetails": [ + { + "mechanismType": "AzureAppPush", + "name": "AzureAppPush-name", + "status": "Completed", + "subState": "Default", + "sendTime": "2021-09-21T04:52:42.8620629+00:00", + "message": null + }, + { + "mechanismType": "Email", + "name": "Email-name", + "status": "Completed", + "subState": "Default", + "sendTime": "2021-09-21T04:52:40.7480368+00:00", + "message": null + }, + { + "mechanismType": "Webhook", + "name": "Webhook-name", + "status": "Completed", + "subState": "Default", + "sendTime": "2021-09-21T04:52:42.0723479+00:00", + "message": null + }, + { + "mechanismType": "SecureWebhook", + "name": "SecureWebhook-name", + "status": "Completed", + "subState": "Default", + "sendTime": "2021-09-21T04:52:42.0723479+00:00", + "message": null + }, + { + "mechanismType": "Sms", + "name": "Sms-name", + "status": "Completed", + "subState": "Default", + "sendTime": "2021-09-21T04:52:41.353015+00:00", + "message": null + }, + { + "mechanismType": "Voice", + "name": "Voice-name", + "status": "Completed", + "subState": "Default", + "sendTime": "2021-09-21T04:52:41.6330734+00:00", + "message": null + } + ] + } + } + } +} diff --git a/specification/monitor/resource-manager/Microsoft.Insights/preview/2023-05-01-preview/tenantActionGroups_API.json b/specification/monitor/resource-manager/Microsoft.Insights/preview/2023-05-01-preview/tenantActionGroups_API.json new file mode 100644 index 000000000000..95ce3518660d --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/preview/2023-05-01-preview/tenantActionGroups_API.json @@ -0,0 +1,862 @@ +{ + "swagger": "2.0", + "info": { + "title": "Azure Tenant Action Groups API", + "x-ms-code-generation-settings": { + "name": "MonitorManagementClient" + }, + "version": "2023-05-01-preview" + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Insights/tenantActionGroups/{tenantActionGroupName}": { + "put": { + "description": "Create a new tenant action group or update an existing one.", + "operationId": "TenantActionGroups_CreateOrUpdate", + "x-ms-examples": { + "Create or update a tenant action group": { + "$ref": "./examples/createOrUpdateTenantActionGroup.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/ManagementGroupIdParameter" + }, + { + "$ref": "#/parameters/ActionGroupNameParameter" + }, + { + "$ref": "#/parameters/TenantIdParameter" + }, + { + "name": "actionGroup", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/TenantActionGroupResource" + }, + "description": "The tenant action group to create or use for the update." + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "An existing tenant action group was successfully updated.", + "schema": { + "$ref": "#/definitions/TenantActionGroupResource" + } + }, + "201": { + "description": "A new tenant action group was successfully created.", + "schema": { + "$ref": "#/definitions/TenantActionGroupResource" + } + }, + "default": { + "description": "An error occurred and the tenant action group could not be created or updated.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "get": { + "description": "Get a tenant action group.", + "operationId": "TenantActionGroups_Get", + "x-ms-examples": { + "Get an action group": { + "$ref": "./examples/getTenantActionGroup.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/ManagementGroupIdParameter" + }, + { + "$ref": "#/parameters/ActionGroupNameParameter" + }, + { + "$ref": "#/parameters/TenantIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The request succeeded.", + "schema": { + "$ref": "#/definitions/TenantActionGroupResource" + } + }, + "default": { + "description": "An error occurred and the tenant action group could not be retrieved. 404: The tenant action group does not exist.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "delete": { + "description": "Delete a tenant action group.", + "operationId": "TenantActionGroups_Delete", + "x-ms-examples": { + "Delete a tenant action group": { + "$ref": "./examples/deleteTenantActionGroup.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/ManagementGroupIdParameter" + }, + { + "$ref": "#/parameters/ActionGroupNameParameter" + }, + { + "$ref": "#/parameters/TenantIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The tenant action group was successfully deleted." + }, + "204": { + "description": "The tenant action group does not exist. It may have already been deleted." + }, + "default": { + "description": "An error occurred and the tenant action group could not be deleted.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "patch": { + "description": "Updates an existing tenant action group's tags. To update other fields use the CreateOrUpdate method.", + "operationId": "TenantActionGroups_Update", + "parameters": [ + { + "$ref": "#/parameters/ManagementGroupIdParameter" + }, + { + "$ref": "#/parameters/ActionGroupNameParameter" + }, + { + "$ref": "#/parameters/TenantIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "name": "tenantActionGroupPatch", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ActionGroupPatchBody" + }, + "description": "Parameters supplied to the operation." + } + ], + "responses": { + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + }, + "200": { + "description": "An existing tenant action group was successfully updated.", + "schema": { + "$ref": "#/definitions/TenantActionGroupResource" + } + } + }, + "x-ms-examples": { + "Patch a tenant action group": { + "$ref": "./examples/patchTenantActionGroup.json" + } + } + } + }, + "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Insights/tenantActionGroups": { + "get": { + "description": "Get a list of all tenant action groups in a management group.", + "operationId": "TenantActionGroups_ListByManagementGroupId", + "x-ms-examples": { + "List tenant action groups at management group level": { + "$ref": "./examples/listTenantActionGroups.json" + } + }, + "x-ms-pageable": { + "nextLinkName": null + }, + "parameters": [ + { + "$ref": "#/parameters/ManagementGroupIdParameter" + }, + { + "$ref": "#/parameters/TenantIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The request succeeded.", + "schema": { + "$ref": "#/definitions/TenantActionGroupList" + } + }, + "default": { + "description": "An error occurred and the list of tenant action groups could not be retrieved.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Insights/tenantActionGroups/{tenantActionGroupName}/createNotifications": { + "post": { + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "description": "Send test notifications to a set of provided receivers", + "operationId": "CreateNotificationsAtTenantActionGroupResourceLevel", + "x-ms-examples": { + "Create notifications at tenant action group level": { + "$ref": "./examples/postTestNotificationsAtTenantActionGroupResourceLevel.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/ManagementGroupIdParameter" + }, + { + "$ref": "#/parameters/ActionGroupNameParameter" + }, + { + "$ref": "#/parameters/TenantIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "name": "notificationRequest", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/TenantNotificationRequestBody" + }, + "description": "The notification request body which includes the contact details" + } + ], + "responses": { + "202": { + "description": "The notification request accepted", + "headers": { + "location": { + "type": "string", + "description": "The location header that has the polling uri." + } + } + }, + "200": { + "description": "The notification succeeded", + "schema": { + "$ref": "#/definitions/TestNotificationDetailsResponse" + } + }, + "default": { + "description": "An error occurred while sending the test notifications", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Insights/tenantActionGroups/{tenantActionGroupName}/notificationStatus/{notificationId}": { + "get": { + "description": "Get the test notifications by the notification id", + "operationId": "GetTestNotificationsAtTenantActionGroupResourceLevel", + "x-ms-examples": { + "Get notification details at tenant action group level": { + "$ref": "./examples/getTestNotificationsAtTenantActionGroupResourceLevel.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/ManagementGroupIdParameter" + }, + { + "$ref": "#/parameters/ActionGroupNameParameter" + }, + { + "$ref": "#/parameters/TenantIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/NotificationIdParameter" + } + ], + "responses": { + "200": { + "description": "The notification details", + "schema": { + "$ref": "#/definitions/TestNotificationDetailsResponse" + } + }, + "default": { + "description": "An error occurred while sending the test notifications", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + } + }, + "definitions": { + "AzureResource": { + "properties": { + "id": { + "type": "string", + "readOnly": true, + "description": "Azure resource Id" + }, + "name": { + "type": "string", + "readOnly": true, + "description": "Azure resource name" + }, + "type": { + "type": "string", + "readOnly": true, + "description": "Azure resource type" + }, + "location": { + "type": "string", + "description": "Resource location", + "x-ms-mutability": [ + "create", + "read" + ] + }, + "tags": { + "additionalProperties": { + "type": "string" + }, + "type": "object", + "description": "Resource tags" + } + }, + "required": [ + "location" + ], + "type": "object", + "x-ms-azure-resource": true, + "description": "An azure resource object" + }, + "TenantNotificationRequestBody": { + "description": "The request body which contain contact detail metadata", + "type": "object", + "properties": { + "alertType": { + "type": "string", + "maxLength": 30, + "description": "The value of the supported alert type. Supported alert type value is: servicehealth" + }, + "emailReceivers": { + "x-ms-identifiers": [], + "type": "array", + "items": { + "$ref": "#/definitions/EmailReceiver" + }, + "description": "The list of email receivers that are part of this action group." + }, + "smsReceivers": { + "x-ms-identifiers": [], + "type": "array", + "items": { + "$ref": "#/definitions/SmsReceiver" + }, + "description": "The list of SMS receivers that are part of this action group." + }, + "webhookReceivers": { + "x-ms-identifiers": [], + "type": "array", + "items": { + "$ref": "#/definitions/WebhookReceiver" + }, + "description": "The list of webhook receivers that are part of this action group." + }, + "azureAppPushReceivers": { + "x-ms-identifiers": [], + "type": "array", + "items": { + "$ref": "#/definitions/AzureAppPushReceiver" + }, + "description": "The list of AzureAppPush receivers that are part of this action group." + }, + "voiceReceivers": { + "x-ms-identifiers": [], + "type": "array", + "items": { + "$ref": "#/definitions/VoiceReceiver" + }, + "description": "The list of voice receivers that are part of this action group." + } + }, + "required": [ + "alertType" + ] + }, + "TestNotificationDetailsResponse": { + "description": "The details of the test notification results.", + "type": "object", + "properties": { + "context": { + "type": "object", + "$ref": "#/definitions/Context" + }, + "state": { + "type": "string", + "description": "The overall state" + }, + "completedTime": { + "type": "string", + "description": "The completed time" + }, + "createdTime": { + "type": "string", + "description": "The created time" + }, + "actionDetails": { + "x-ms-identifiers": [], + "type": "array", + "items": { + "$ref": "#/definitions/ActionDetail" + }, + "description": "The list of action detail" + } + }, + "required": [ + "state" + ] + }, + "ActionDetail": { + "description": "The action detail", + "type": "object", + "properties": { + "mechanismType": { + "type": "string", + "description": "The mechanism type" + }, + "name": { + "type": "string", + "description": "The name of the action" + }, + "status": { + "type": "string", + "description": "The status of the action" + }, + "subState": { + "type": "string", + "description": "The substatus of the action" + }, + "sendTime": { + "type": "string", + "description": "The send time" + }, + "message": { + "type": "string", + "description": "The detail of the friendly error message" + } + } + }, + "Context": { + "description": "The context info", + "type": "object", + "properties": { + "notificationSource": { + "type": "string", + "description": "The source of the notification request" + }, + "contextType": { + "type": "string", + "description": "The context id type" + } + } + }, + "TenantActionGroupResource": { + "description": "A tenant action group resource.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/AzureResource" + } + ], + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/TenantActionGroup", + "description": "The tenant action groups properties of the resource." + } + } + }, + "TenantActionGroupList": { + "description": "A list of tenant action groups.", + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/TenantActionGroupResource" + }, + "description": "The list of tenant action groups." + }, + "nextLink": { + "type": "string", + "description": "Provides the link to retrieve the next set of elements." + } + } + }, + "TenantActionGroup": { + "description": "A tenant action group.", + "type": "object", + "properties": { + "groupShortName": { + "type": "string", + "maxLength": 12, + "description": "The short name of the action group. This will be used in SMS messages." + }, + "enabled": { + "type": "boolean", + "default": true, + "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." + }, + "emailReceivers": { + "x-ms-identifiers": [ + "emailAddress" + ], + "type": "array", + "items": { + "$ref": "#/definitions/EmailReceiver" + }, + "description": "The list of email receivers that are part of this tenant action group." + }, + "smsReceivers": { + "x-ms-identifiers": [ + "phoneNumber" + ], + "type": "array", + "items": { + "$ref": "#/definitions/SmsReceiver" + }, + "description": "The list of SMS receivers that are part of this tenant action group." + }, + "webhookReceivers": { + "x-ms-identifiers": [ + "name" + ], + "type": "array", + "items": { + "$ref": "#/definitions/WebhookReceiver" + }, + "description": "The list of webhook receivers that are part of this tenant action group." + }, + "azureAppPushReceivers": { + "x-ms-identifiers": [ + "emailAddress" + ], + "type": "array", + "items": { + "$ref": "#/definitions/AzureAppPushReceiver" + }, + "description": "The list of AzureAppPush receivers that are part of this tenant action group." + }, + "voiceReceivers": { + "x-ms-identifiers": [ + "phoneNumber" + ], + "type": "array", + "items": { + "$ref": "#/definitions/VoiceReceiver" + }, + "description": "The list of voice receivers that are part of this tenant action group." + } + }, + "required": [ + "groupShortName", + "enabled" + ] + }, + "EmailReceiver": { + "description": "An email receiver.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the email receiver. Names must be unique across all receivers within a tenant action group." + }, + "emailAddress": { + "type": "string", + "description": "The email address of this receiver." + }, + "useCommonAlertSchema": { + "type": "boolean", + "default": false, + "description": "Indicates whether to use common alert schema." + }, + "status": { + "readOnly": true, + "$ref": "#/definitions/ReceiverStatus", + "description": "The receiver status of the e-mail." + } + }, + "required": [ + "name", + "emailAddress" + ] + }, + "SmsReceiver": { + "description": "An SMS receiver.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the SMS receiver. Names must be unique across all receivers within a tenant action group." + }, + "countryCode": { + "type": "string", + "description": "The country code of the SMS receiver." + }, + "phoneNumber": { + "type": "string", + "description": "The phone number of the SMS receiver." + }, + "status": { + "readOnly": true, + "$ref": "#/definitions/ReceiverStatus", + "description": "The status of the receiver." + } + }, + "required": [ + "name", + "countryCode", + "phoneNumber" + ] + }, + "WebhookReceiver": { + "description": "A webhook receiver.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the webhook receiver. Names must be unique across all receivers within a tenant action group." + }, + "serviceUri": { + "type": "string", + "description": "The URI where webhooks should be sent." + }, + "useCommonAlertSchema": { + "type": "boolean", + "default": false, + "description": "Indicates whether to use common alert schema." + }, + "useAadAuth": { + "type": "boolean", + "default": false, + "description": "Indicates whether or not use AAD authentication." + }, + "objectId": { + "type": "string", + "description": "Indicates the webhook app object Id for aad auth." + }, + "identifierUri": { + "type": "string", + "description": "Indicates the identifier uri for aad auth." + }, + "tenantId": { + "type": "string", + "description": "Indicates the tenant id for aad auth." + } + }, + "required": [ + "name", + "serviceUri" + ] + }, + "AzureAppPushReceiver": { + "description": "The Azure mobile App push notification receiver.", + "type": "object", + "properties": { + "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." + }, + "emailAddress": { + "type": "string", + "description": "The email address registered for the Azure mobile app." + } + }, + "required": [ + "name", + "emailAddress" + ] + }, + "VoiceReceiver": { + "description": "A voice receiver.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the voice receiver. Names must be unique across all receivers within a tenant action group." + }, + "countryCode": { + "type": "string", + "description": "The country code of the voice receiver." + }, + "phoneNumber": { + "type": "string", + "description": "The phone number of the voice receiver." + } + }, + "required": [ + "name", + "countryCode", + "phoneNumber" + ] + }, + "ReceiverStatus": { + "type": "string", + "enum": [ + "NotSpecified", + "Enabled", + "Disabled" + ], + "x-ms-enum": { + "name": "ReceiverStatus", + "modelAsString": false + }, + "description": "Indicates the status of the receiver. Receivers that are not Enabled will not receive any communications." + }, + "ErrorResponse": { + "description": "Describes the format of Error response.", + "type": "object", + "properties": { + "code": { + "description": "Error code", + "type": "string" + }, + "message": { + "description": "Error message indicating why the operation failed.", + "type": "string" + } + } + }, + "ActionGroupPatchBody": { + "description": "A tenant action group object for the body of patch operations.", + "type": "object", + "properties": { + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Resource tags" + }, + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/ActionGroupPatch", + "description": "The action group settings for an update operation." + } + } + }, + "ActionGroupPatch": { + "description": "A tenant action group for patch operations.", + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "default": true, + "description": "Indicates whether this tenant action group is enabled. If a tenant action group is not enabled, then none of its actions will be activated." + } + } + } + }, + "parameters": { + "ManagementGroupIdParameter": { + "name": "managementGroupId", + "in": "path", + "required": true, + "type": "string", + "description": "The management group id.", + "x-ms-parameter-location": "method" + }, + "ActionGroupNameParameter": { + "name": "tenantActionGroupName", + "in": "path", + "required": true, + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9]*$", + "minLength": 1, + "maxLength": 260, + "description": "The name of the action group.", + "x-ms-parameter-location": "method" + }, + "NotificationIdParameter": { + "name": "notificationId", + "in": "path", + "required": true, + "type": "string", + "description": "The notification id", + "x-ms-parameter-location": "method" + }, + "TenantIdParameter": { + "name": "x-ms-client-tenant-id", + "in": "header", + "description": "The tenant ID of the client making the request.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/monitor/resource-manager/readme.md b/specification/monitor/resource-manager/readme.md index 1a6699c67241..fc43a447c21c 100644 --- a/specification/monitor/resource-manager/readme.md +++ b/specification/monitor/resource-manager/readme.md @@ -37,6 +37,14 @@ directive: reason: 'There are open issues (bugs) in the validator affecting some of the examples and since there is no way to selectively disable the validation for a particular example or paths, all of the example validation is being turned off.' ``` +### Tag: package-2023-05-01-preview-only + +These settings apply only when `--tag=package-2023-05-01-preview-only` is specified on the command line + +``` yaml $(tag) == 'package-2023-05-01-preview-only' +input-file: +- Microsoft.Insights/preview/2023-05-01-preview/tenantActionGroups_API.json +``` ### Tag: package-2023-04 @@ -54,7 +62,7 @@ input-file: - Microsoft.Insights/preview/2021-05-01-preview/diagnosticsSettings_API.json - Microsoft.Insights/preview/2021-05-01-preview/diagnosticsSettingsCategories_API.json - Microsoft.Insights/stable/2023-01-01/actionGroups_API.json - - Microsoft.Insights/preview/2023-03-01-preview/tenantActionGroups_API.json + - Microsoft.Insights/preview/2023-05-01-preview/tenantActionGroups_API.json - Microsoft.Insights/stable/2015-04-01/activityLogs_API.json - Microsoft.Insights/stable/2015-04-01/eventCategories_API.json - Microsoft.Insights/stable/2015-04-01/tenantActivityLogs_API.json