diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/scheduledActions/scheduledAction-createOrUpdate-private.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/scheduledActions/scheduledAction-create-private.json similarity index 61% rename from specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/scheduledActions/scheduledAction-createOrUpdate-private.json rename to specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/scheduledActions/scheduledAction-create-private.json index 0f20da030e4e..851359b76457 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/scheduledActions/scheduledAction-createOrUpdate-private.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/scheduledActions/scheduledAction-create-private.json @@ -76,51 +76,6 @@ "viewId": "/providers/Microsoft.CostManagement/views/swaggerExample" } } - }, - "200": { - "body": { - "id": "providers/Microsoft.CostManagement/scheduledActions/monthlyCostByResource", - "name": "monthlyCostByResource", - "type": "Microsoft.CostManagement/ScheduledActions", - "kind": "Email", - "eTag": "\"1d4ff9fe66f1d10\"", - "systemData": { - "createdBy": "testuser", - "createdByType": "User", - "createdAt": "2020-06-18T22:21:51.1287144Z", - "lastModifiedBy": "testuser", - "lastModifiedByType": "User", - "lastModifiedAt": "2020-06-19T22:21:51.1287144Z" - }, - "properties": { - "displayName": "Monthly Cost By Resource", - "notification": { - "language": "fr", - "regionalFormat": "fr", - "to": [ - "user@gmail.com", - "team@gmail.com" - ], - "subject": "Cost by resource this month" - }, - "scope": "", - "status": "Enabled", - "schedule": { - "frequency": "Monthly", - "weeksOfMonth": [ - "First", - "Third" - ], - "daysOfWeek": [ - "Monday" - ], - "hourOfDay": 10, - "startDate": "2020-06-19T22:21:51.1287144Z", - "endDate": "2021-06-19T22:21:51.1287144Z" - }, - "viewId": "/providers/Microsoft.CostManagement/views/swaggerExample" - } - } } } } diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/scheduledActions/scheduledAction-createOrUpdate-shared.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/scheduledActions/scheduledAction-create-shared.json similarity index 63% rename from specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/scheduledActions/scheduledAction-createOrUpdate-shared.json rename to specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/scheduledActions/scheduledAction-create-shared.json index 7358f399de5d..94bec39f841c 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/scheduledActions/scheduledAction-createOrUpdate-shared.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/scheduledActions/scheduledAction-create-shared.json @@ -85,49 +85,6 @@ "viewId": "/providers/Microsoft.CostManagement/views/swaggerExample" } } - }, - "200": { - "body": { - "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/scheduledActions/monthlyCostByResource", - "name": "monthlyCostByResource", - "type": "Microsoft.CostManagement/ScheduledActions", - "kind": "Email", - "eTag": "\"1d4ff9fe66f1d10\"", - "systemData": { - "createdBy": "testuser", - "createdByType": "User", - "createdAt": "2020-06-18T22:21:51.1287144Z", - "lastModifiedBy": "testuser", - "lastModifiedByType": "User", - "lastModifiedAt": "2020-06-19T22:21:51.1287144Z" - }, - "properties": { - "displayName": "Monthly Cost By Resource", - "notification": { - "to": [ - "user@gmail.com", - "team@gmail.com" - ], - "subject": "Cost by resource this month" - }, - "scope": "subscriptions/00000000-0000-0000-0000-000000000000", - "schedule": { - "frequency": "Monthly", - "weeksOfMonth": [ - "First", - "Third" - ], - "daysOfWeek": [ - "Monday" - ], - "hourOfDay": 10, - "startDate": "2020-06-19T22:21:51.1287144Z", - "endDate": "2021-06-19T22:21:51.1287144Z" - }, - "status": "Enabled", - "viewId": "/providers/Microsoft.CostManagement/views/swaggerExample" - } - } } } } diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/scheduledActions/scheduledAction-insightAlert-createOrUpdate-shared.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/scheduledActions/scheduledAction-insightAlert-create-shared.json similarity index 61% rename from specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/scheduledActions/scheduledAction-insightAlert-createOrUpdate-shared.json rename to specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/scheduledActions/scheduledAction-insightAlert-create-shared.json index 859871813450..5fbe2d05db09 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/scheduledActions/scheduledAction-insightAlert-createOrUpdate-shared.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/scheduledActions/scheduledAction-insightAlert-create-shared.json @@ -62,44 +62,6 @@ "viewId": "/providers/Microsoft.CostManagement/views/swaggerExample" } } - }, - "200": { - "body": { - "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/scheduledActions/dailyAnomalyByResource", - "name": "dailyAnomalyByResource", - "type": "Microsoft.CostManagement/ScheduledActions", - "kind": "InsightAlert", - "eTag": "\"1d4ff9fe66f1d10\"", - "systemData": { - "createdBy": "testuser", - "createdByType": "User", - "createdAt": "2020-06-18T22:21:51.1287144Z", - "lastModifiedBy": "testuser", - "lastModifiedByType": "User", - "lastModifiedAt": "2020-06-19T22:21:51.1287144Z" - }, - "properties": { - "displayName": "Daily anomaly by resource", - "fileDestination": { - "fileFormats": [] - }, - "notification": { - "to": [ - "user@gmail.com", - "team@gmail.com" - ], - "subject": "Cost anomaly detected in the resource" - }, - "scope": "subscriptions/00000000-0000-0000-0000-000000000000", - "schedule": { - "frequency": "Daily", - "startDate": "2020-06-19T22:21:51.1287144Z", - "endDate": "2021-06-19T22:21:51.1287144Z" - }, - "status": "Enabled", - "viewId": "/providers/Microsoft.CostManagement/views/swaggerExample" - } - } } } } diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/scheduledActions/scheduledAction-insightAlert-update-shared.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/scheduledActions/scheduledAction-insightAlert-update-shared.json new file mode 100644 index 000000000000..5288b475b103 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/scheduledActions/scheduledAction-insightAlert-update-shared.json @@ -0,0 +1,68 @@ +{ + "parameters": { + "api-version": "2022-10-01", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000", + "name": "dailyAnomalyByResource", + "scheduledAction": { + "kind": "InsightAlert", + "eTag": "\"1d4ff9fe66f1d09\"", + "properties": { + "displayName": "Daily anomaly by resource", + "notification": { + "to": [ + "user@gmail.com", + "team@gmail.com" + ], + "subject": "Cost anomaly detected in the resource" + }, + "schedule": { + "frequency": "Daily", + "startDate": "2020-06-19T22:21:51.1287144Z", + "endDate": "2021-06-19T22:21:51.1287144Z" + }, + "status": "Enabled", + "viewId": "/providers/Microsoft.CostManagement/views/swaggerExample" + } + } + }, + "responses": { + "200": { + "body": { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/scheduledActions/dailyAnomalyByResource", + "name": "dailyAnomalyByResource", + "type": "Microsoft.CostManagement/ScheduledActions", + "kind": "InsightAlert", + "eTag": "\"1d4ff9fe66f1d10\"", + "systemData": { + "createdBy": "testuser", + "createdByType": "User", + "createdAt": "2020-06-18T22:21:51.1287144Z", + "lastModifiedBy": "testuser", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-06-19T22:21:51.1287144Z" + }, + "properties": { + "displayName": "Daily anomaly by resource", + "fileDestination": { + "fileFormats": [] + }, + "notification": { + "to": [ + "user@gmail.com", + "team@gmail.com" + ], + "subject": "Cost anomaly detected in the resource" + }, + "scope": "subscriptions/00000000-0000-0000-0000-000000000000", + "schedule": { + "frequency": "Daily", + "startDate": "2020-06-19T22:21:51.1287144Z", + "endDate": "2021-06-19T22:21:51.1287144Z" + }, + "status": "Enabled", + "viewId": "/providers/Microsoft.CostManagement/views/swaggerExample" + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/scheduledActions/scheduledAction-update-private.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/scheduledActions/scheduledAction-update-private.json new file mode 100644 index 000000000000..8d0fec9e0fe6 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/scheduledActions/scheduledAction-update-private.json @@ -0,0 +1,82 @@ +{ + "parameters": { + "api-version": "2022-10-01", + "name": "monthlyCostByResource", + "scheduledAction": { + "kind": "Email", + "eTag": "\"1d4ff9fe66f1d09\"", + "properties": { + "displayName": "Monthly Cost By Resource", + "notification": { + "to": [ + "user@gmail.com", + "team@gmail.com" + ], + "subject": "Cost by resource this month" + }, + "schedule": { + "frequency": "Monthly", + "weeksOfMonth": [ + "First", + "Third" + ], + "daysOfWeek": [ + "Monday" + ], + "hourOfDay": 10, + "startDate": "2020-06-19T22:21:51.1287144Z", + "endDate": "2021-06-19T22:21:51.1287144Z" + }, + "status": "Enabled", + "viewId": "/providers/Microsoft.CostManagement/views/swaggerExample" + } + } + }, + "responses": { + "200": { + "body": { + "id": "providers/Microsoft.CostManagement/scheduledActions/monthlyCostByResource", + "name": "monthlyCostByResource", + "type": "Microsoft.CostManagement/ScheduledActions", + "kind": "Email", + "eTag": "\"1d4ff9fe66f1d10\"", + "systemData": { + "createdBy": "testuser", + "createdByType": "User", + "createdAt": "2020-06-18T22:21:51.1287144Z", + "lastModifiedBy": "testuser", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-06-19T22:21:51.1287144Z" + }, + "properties": { + "displayName": "Monthly Cost By Resource", + "notification": { + "language": "fr", + "regionalFormat": "fr", + "to": [ + "user@gmail.com", + "team@gmail.com" + ], + "subject": "Cost by resource this month" + }, + "scope": "", + "status": "Enabled", + "schedule": { + "frequency": "Monthly", + "weeksOfMonth": [ + "First", + "Third" + ], + "daysOfWeek": [ + "Monday" + ], + "hourOfDay": 10, + "startDate": "2020-06-19T22:21:51.1287144Z", + "endDate": "2021-06-19T22:21:51.1287144Z" + }, + "viewId": "/providers/Microsoft.CostManagement/views/swaggerExample" + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/scheduledActions/scheduledAction-update-shared.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/scheduledActions/scheduledAction-update-shared.json new file mode 100644 index 000000000000..125799708323 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/scheduledActions/scheduledAction-update-shared.json @@ -0,0 +1,86 @@ +{ + "parameters": { + "api-version": "2022-10-01", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000", + "name": "monthlyCostByResource", + "scheduledAction": { + "kind": "Email", + "eTag": "\"1d4ff9fe66f1d09\"", + "properties": { + "displayName": "Monthly Cost By Resource", + "fileDestination": { + "fileFormats": [ + "Csv" + ] + }, + "notification": { + "to": [ + "user@gmail.com", + "team@gmail.com" + ], + "subject": "Cost by resource this month" + }, + "schedule": { + "frequency": "Monthly", + "weeksOfMonth": [ + "First", + "Third" + ], + "daysOfWeek": [ + "Monday" + ], + "hourOfDay": 10, + "startDate": "2020-06-19T22:21:51.1287144Z", + "endDate": "2021-06-19T22:21:51.1287144Z" + }, + "status": "Enabled", + "viewId": "/providers/Microsoft.CostManagement/views/swaggerExample" + } + } + }, + "responses": { + "200": { + "body": { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/scheduledActions/monthlyCostByResource", + "name": "monthlyCostByResource", + "type": "Microsoft.CostManagement/ScheduledActions", + "kind": "Email", + "eTag": "\"1d4ff9fe66f1d10\"", + "systemData": { + "createdBy": "testuser", + "createdByType": "User", + "createdAt": "2020-06-18T22:21:51.1287144Z", + "lastModifiedBy": "testuser", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-06-19T22:21:51.1287144Z" + }, + "properties": { + "displayName": "Monthly Cost By Resource", + "notification": { + "to": [ + "user@gmail.com", + "team@gmail.com" + ], + "subject": "Cost by resource this month" + }, + "scope": "subscriptions/00000000-0000-0000-0000-000000000000", + "schedule": { + "frequency": "Monthly", + "weeksOfMonth": [ + "First", + "Third" + ], + "daysOfWeek": [ + "Monday" + ], + "hourOfDay": 10, + "startDate": "2020-06-19T22:21:51.1287144Z", + "endDate": "2021-06-19T22:21:51.1287144Z" + }, + "status": "Enabled", + "viewId": "/providers/Microsoft.CostManagement/views/swaggerExample" + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/scheduledActions.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/scheduledActions.json index 1c324820e036..35acdb493093 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/scheduledActions.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/scheduledActions.json @@ -142,8 +142,11 @@ "operationId": "ScheduledActions_CreateOrUpdate", "description": "Create or update a private scheduled action.", "x-ms-examples": { - "CreateOrUpdatePrivateScheduledAction": { - "$ref": "./examples/scheduledActions/scheduledAction-createOrUpdate-private.json" + "CreatePrivateScheduledAction": { + "$ref": "./examples/scheduledActions/scheduledAction-create-private.json" + }, + "UpdatePrivateScheduledAction": { + "$ref": "./examples/scheduledActions/scheduledAction-update-private.json" } }, "parameters": [ @@ -267,11 +270,17 @@ "operationId": "ScheduledActions_CreateOrUpdateByScope", "description": "Create or update a shared scheduled action within the given scope.", "x-ms-examples": { - "CreateOrUpdateScheduledActionByScope": { - "$ref": "./examples/scheduledActions/scheduledAction-createOrUpdate-shared.json" + "CreateScheduledActionByScope": { + "$ref": "./examples/scheduledActions/scheduledAction-create-shared.json" + }, + "UpdateScheduledActionByScope": { + "$ref": "./examples/scheduledActions/scheduledAction-update-shared.json" + }, + "CreateInsightAlertScheduledActionByScope": { + "$ref": "./examples/scheduledActions/scheduledAction-insightAlert-create-shared.json" }, - "CreateOrUpdateInsightAlertScheduledActionByScope": { - "$ref": "./examples/scheduledActions/scheduledAction-insightAlert-createOrUpdate-shared.json" + "UpdateInsightAlertScheduledActionByScope": { + "$ref": "./examples/scheduledActions/scheduledAction-insightAlert-update-shared.json" } }, "parameters": [