diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-04-01-preview/examples/checkNameAvailability-private-scheduledAction.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-04-01-preview/examples/checkNameAvailability-private-scheduledAction.json new file mode 100644 index 000000000000..7363728ce4d3 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-04-01-preview/examples/checkNameAvailability-private-scheduledAction.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2022-04-01-preview", + "checkNameAvailabilityRequest": { + "name": "testName", + "type": "Microsoft.CostManagement/ScheduledActions" + } + }, + "responses": { + "200": { + "body": { + "nameAvailable": false, + "reason": "AlreadyExists", + "message": "A private scheduled action with name 'testName' is already present. Please specify a differnt name." + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-04-01-preview/examples/checkNameAvailability-shared-scheduledAction.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-04-01-preview/examples/checkNameAvailability-shared-scheduledAction.json new file mode 100644 index 000000000000..15883a61b5b5 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-04-01-preview/examples/checkNameAvailability-shared-scheduledAction.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "api-version": "2022-04-01-preview", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000", + "checkNameAvailabilityRequest": { + "name": "testName", + "type": "Microsoft.CostManagement/ScheduledActions" + } + }, + "responses": { + "200": { + "body": { + "nameAvailable": true + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-04-01-preview/examples/scheduledAction-createOrUpdate-private.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-04-01-preview/examples/scheduledAction-createOrUpdate-private.json new file mode 100644 index 000000000000..0f74352d319a --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-04-01-preview/examples/scheduledAction-createOrUpdate-private.json @@ -0,0 +1,122 @@ +{ + "parameters": { + "api-version": "2022-04-01-preview", + "name": "monthlyCostByResource", + "scheduledAction": { + "kind": "Email", + "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": { + "201": { + "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-18T22:21:51.1287144Z" + }, + "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" + }, + "scope": "", + "status": "Enabled", + "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": { + "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/preview/2022-04-01-preview/examples/scheduledAction-createOrUpdate-shared.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-04-01-preview/examples/scheduledAction-createOrUpdate-shared.json new file mode 100644 index 000000000000..ea70c028d14b --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-04-01-preview/examples/scheduledAction-createOrUpdate-shared.json @@ -0,0 +1,133 @@ +{ + "parameters": { + "api-version": "2022-04-01-preview", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000", + "name": "monthlyCostByResource", + "scheduledAction": { + "kind": "Email", + "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": { + "201": { + "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-18T22:21:51.1287144Z" + }, + "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" + }, + "scope": "subscriptions/00000000-0000-0000-0000-000000000000", + "status": "Enabled", + "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/preview/2022-04-01-preview/examples/scheduledAction-delete-private.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-04-01-preview/examples/scheduledAction-delete-private.json new file mode 100644 index 000000000000..4f82f5255d49 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-04-01-preview/examples/scheduledAction-delete-private.json @@ -0,0 +1,10 @@ +{ + "parameters": { + "api-version": "2022-04-01-preview", + "name": "monthlyCostByResource" + }, + "responses": { + "200": {}, + "204": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-04-01-preview/examples/scheduledAction-delete-shared.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-04-01-preview/examples/scheduledAction-delete-shared.json new file mode 100644 index 000000000000..d32c1acbb99c --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-04-01-preview/examples/scheduledAction-delete-shared.json @@ -0,0 +1,11 @@ +{ + "parameters": { + "api-version": "2022-04-01-preview", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000", + "name": "monthlyCostByResource" + }, + "responses": { + "200": {}, + "204": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-04-01-preview/examples/scheduledAction-execute-private.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-04-01-preview/examples/scheduledAction-execute-private.json new file mode 100644 index 000000000000..4df245959822 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-04-01-preview/examples/scheduledAction-execute-private.json @@ -0,0 +1,9 @@ +{ + "parameters": { + "api-version": "2022-04-01-preview", + "name": "monthlyCostByResource" + }, + "responses": { + "200": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-04-01-preview/examples/scheduledAction-execute-shared.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-04-01-preview/examples/scheduledAction-execute-shared.json new file mode 100644 index 000000000000..6d24b53da714 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-04-01-preview/examples/scheduledAction-execute-shared.json @@ -0,0 +1,10 @@ +{ + "parameters": { + "api-version": "2022-04-01-preview", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000", + "name": "monthlyCostByResource" + }, + "responses": { + "200": {} + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-04-01-preview/examples/scheduledAction-get-private.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-04-01-preview/examples/scheduledAction-get-private.json new file mode 100644 index 000000000000..a62be6ffe25f --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-04-01-preview/examples/scheduledAction-get-private.json @@ -0,0 +1,51 @@ +{ + "parameters": { + "api-version": "2022-04-01-preview", + "name": "monthlyCostByResource" + }, + "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-18T22:21:51.1287144Z" + }, + "properties": { + "displayName": "Monthly Cost By Resource", + "scope": "", + "status": "Enabled", + "viewId": "/providers/Microsoft.CostManagement/views/swaggerExample", + "schedule": { + "frequency": "Monthly", + "weeksOfMonth": [ + "First", + "Third" + ], + "daysOfWeek": [ + "Monday" + ], + "hourOfDay": 10, + "startDate": "2020-06-19T22:21:51.1287144Z", + "endDate": "2021-06-19T22:21:51.1287144Z" + }, + "notification": { + "to": [ + "user@gmail.com", + "team@gmail.com" + ], + "subject": "Cost by resource this month" + } + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-04-01-preview/examples/scheduledAction-get-shared.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-04-01-preview/examples/scheduledAction-get-shared.json new file mode 100644 index 000000000000..3d1f6b94fbc6 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-04-01-preview/examples/scheduledAction-get-shared.json @@ -0,0 +1,52 @@ +{ + "parameters": { + "api-version": "2022-04-01-preview", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000", + "name": "monthlyCostByResource" + }, + "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-18T22:21:51.1287144Z" + }, + "properties": { + "displayName": "Monthly Cost By Resource", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000", + "status": "Enabled", + "viewId": "/providers/Microsoft.CostManagement/views/swaggerExample", + "schedule": { + "frequency": "Monthly", + "weeksOfMonth": [ + "First", + "Third" + ], + "daysOfWeek": [ + "Monday" + ], + "hourOfDay": 10, + "startDate": "2020-06-19T22:21:51.1287144Z", + "endDate": "2021-06-19T22:21:51.1287144Z" + }, + "notification": { + "to": [ + "user@gmail.com", + "team@gmail.com" + ], + "subject": "Cost by resource this month" + } + } + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-04-01-preview/examples/scheduledActions-list-private.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-04-01-preview/examples/scheduledActions-list-private.json new file mode 100644 index 000000000000..08b390f128f7 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-04-01-preview/examples/scheduledActions-list-private.json @@ -0,0 +1,89 @@ +{ + "parameters": { + "api-version": "2022-04-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "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-18T22:21:51.1287144Z" + }, + "properties": { + "displayName": "Monthly Cost By Resource", + "scope": "", + "status": "Enabled", + "viewId": "/providers/Microsoft.CostManagement/views/swaggerExample", + "schedule": { + "frequency": "Monthly", + "weeksOfMonth": [ + "First", + "Third" + ], + "daysOfWeek": [ + "Monday" + ], + "hourOfDay": 10, + "startDate": "2020-06-19T22:21:51.1287144Z", + "endDate": "2021-06-19T22:21:51.1287144Z" + }, + "notification": { + "to": [ + "user@gmail.com", + "team@gmail.com" + ], + "subject": "Cost by resource this month" + } + } + }, + { + "id": "providers/Microsoft.CostManagement/scheduledActions/dailyCostByResource", + "name": "dailyCostByResource", + "type": "Microsoft.CostManagement/ScheduledActions", + "kind": "Email", + "eTag": "\"1d4ff9fe66f1d15\"", + "systemData": { + "createdBy": "testuser", + "createdByType": "User", + "createdAt": "2020-06-18T22:21:51.1287144Z", + "lastModifiedBy": "testuser", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-06-18T22:21:51.1287144Z" + }, + "properties": { + "displayName": "Daily Cost By Resource", + "scope": "", + "status": "Disabled", + "viewId": "/providers/Microsoft.CostManagement/views/swaggerExample", + "schedule": { + "frequency": "Daily", + "hourOfDay": 12, + "startDate": "2020-06-19T22:21:51.1287144Z", + "endDate": "2021-06-19T22:21:51.1287144Z" + }, + "notification": { + "to": [ + "user@gmail.com", + "team@gmail.com" + ], + "subject": "Daily Cost By Resource" + } + } + } + ], + "nextLink": null + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-04-01-preview/examples/scheduledActions-list-shared.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-04-01-preview/examples/scheduledActions-list-shared.json new file mode 100644 index 000000000000..cb267374703f --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-04-01-preview/examples/scheduledActions-list-shared.json @@ -0,0 +1,90 @@ +{ + "parameters": { + "api-version": "2022-04-01-preview", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "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-18T22:21:51.1287144Z" + }, + "properties": { + "displayName": "Monthly Cost By Resource", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000", + "status": "Enabled", + "viewId": "/providers/Microsoft.CostManagement/views/swaggerExample", + "schedule": { + "frequency": "Monthly", + "weeksOfMonth": [ + "First", + "Third" + ], + "daysOfWeek": [ + "Monday" + ], + "hourOfDay": 10, + "startDate": "2020-06-19T22:21:51.1287144Z", + "endDate": "2021-06-19T22:21:51.1287144Z" + }, + "notification": { + "to": [ + "user@gmail.com", + "team@gmail.com" + ], + "subject": "Cost by resource this month" + } + } + }, + { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/scheduledActions/dailyCostByResource", + "name": "dailyCostByResource", + "type": "Microsoft.CostManagement/ScheduledActions", + "kind": "Email", + "eTag": "\"1d4ff9fe66f1d15\"", + "systemData": { + "createdBy": "testuser", + "createdByType": "User", + "createdAt": "2020-06-18T22:21:51.1287144Z", + "lastModifiedBy": "testuser", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-06-18T22:21:51.1287144Z" + }, + "properties": { + "displayName": "Daily Cost By Resource", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000", + "status": "Disabled", + "viewId": "/providers/Microsoft.CostManagement/views/swaggerExample", + "schedule": { + "frequency": "Daily", + "hourOfDay": 12, + "startDate": "2020-06-19T22:21:51.1287144Z", + "endDate": "2021-06-19T22:21:51.1287144Z" + }, + "notification": { + "to": [ + "user@gmail.com", + "team@gmail.com" + ], + "subject": "Daily Cost By Resource" + } + } + } + ], + "nextLink": null + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-04-01-preview/examples/scheduledActions-listWithFilter-private.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-04-01-preview/examples/scheduledActions-listWithFilter-private.json new file mode 100644 index 000000000000..046e7b7106ec --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-04-01-preview/examples/scheduledActions-listWithFilter-private.json @@ -0,0 +1,90 @@ +{ + "parameters": { + "api-version": "2022-04-01-preview", + "$filter": "properties/viewId eq '/providers/Microsoft.CostManagement/views/swaggerExample'" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "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-18T22:21:51.1287144Z" + }, + "properties": { + "displayName": "Monthly Cost By Resource", + "scope": "", + "status": "Enabled", + "viewId": "/providers/Microsoft.CostManagement/views/swaggerExample", + "schedule": { + "frequency": "Monthly", + "weeksOfMonth": [ + "First", + "Third" + ], + "daysOfWeek": [ + "Monday" + ], + "hourOfDay": 10, + "startDate": "2020-06-19T22:21:51.1287144Z", + "endDate": "2021-06-19T22:21:51.1287144Z" + }, + "notification": { + "to": [ + "user@gmail.com", + "team@gmail.com" + ], + "subject": "Cost by resource this month" + } + } + }, + { + "id": "providers/Microsoft.CostManagement/scheduledActions/dailyCostByResource", + "name": "dailyCostByResource", + "type": "Microsoft.CostManagement/ScheduledActions", + "kind": "Email", + "eTag": "\"1d4ff9fe66f1d15\"", + "systemData": { + "createdBy": "testuser", + "createdByType": "User", + "createdAt": "2020-06-18T22:21:51.1287144Z", + "lastModifiedBy": "testuser", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-06-18T22:21:51.1287144Z" + }, + "properties": { + "displayName": "Daily Cost By Resource", + "scope": "", + "status": "Disabled", + "viewId": "/providers/Microsoft.CostManagement/views/swaggerExample", + "schedule": { + "frequency": "Daily", + "hourOfDay": 12, + "startDate": "2020-06-19T22:21:51.1287144Z", + "endDate": "2021-06-19T22:21:51.1287144Z" + }, + "notification": { + "to": [ + "user@gmail.com", + "team@gmail.com" + ], + "subject": "Daily Cost By Resource" + } + } + } + ], + "nextLink": null + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-04-01-preview/examples/scheduledActions-listWithFilter-shared.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-04-01-preview/examples/scheduledActions-listWithFilter-shared.json new file mode 100644 index 000000000000..a1c299941117 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-04-01-preview/examples/scheduledActions-listWithFilter-shared.json @@ -0,0 +1,91 @@ +{ + "parameters": { + "api-version": "2022-04-01-preview", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000", + "$filter": "properties/viewId eq '/providers/Microsoft.CostManagement/views/swaggerExample'" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "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-18T22:21:51.1287144Z" + }, + "properties": { + "displayName": "Monthly Cost By Resource", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000", + "status": "Enabled", + "viewId": "/providers/Microsoft.CostManagement/views/swaggerExample", + "schedule": { + "frequency": "Monthly", + "weeksOfMonth": [ + "First", + "Third" + ], + "daysOfWeek": [ + "Monday" + ], + "hourOfDay": 10, + "startDate": "2020-06-19T22:21:51.1287144Z", + "endDate": "2021-06-19T22:21:51.1287144Z" + }, + "notification": { + "to": [ + "user@gmail.com", + "team@gmail.com" + ], + "subject": "Cost by resource this month" + } + } + }, + { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/scheduledActions/dailyCostByResource", + "name": "dailyCostByResource", + "type": "Microsoft.CostManagement/ScheduledActions", + "kind": "Email", + "eTag": "\"1d4ff9fe66f1d15\"", + "systemData": { + "createdBy": "testuser", + "createdByType": "User", + "createdAt": "2020-06-18T22:21:51.1287144Z", + "lastModifiedBy": "testuser", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-06-18T22:21:51.1287144Z" + }, + "properties": { + "displayName": "Daily Cost By Resource", + "scope": "subscriptions/00000000-0000-0000-0000-000000000000", + "status": "Disabled", + "viewId": "/providers/Microsoft.CostManagement/views/swaggerExample", + "schedule": { + "frequency": "Daily", + "hourOfDay": 12, + "startDate": "2020-06-19T22:21:51.1287144Z", + "endDate": "2021-06-19T22:21:51.1287144Z" + }, + "notification": { + "to": [ + "user@gmail.com", + "team@gmail.com" + ], + "subject": "Daily Cost By Resource" + } + } + } + ], + "nextLink": null + } + } + } +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-04-01-preview/scheduledActions.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-04-01-preview/scheduledActions.json new file mode 100644 index 000000000000..721e7543f60c --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/preview/2022-04-01-preview/scheduledActions.json @@ -0,0 +1,977 @@ +{ + "swagger": "2.0", + "info": { + "title": "CostManagementClient", + "version": "2022-04-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.CostManagement/scheduledActions": { + "get": { + "tags": [ + "ScheduledActions" + ], + "operationId": "ScheduledActions_List", + "description": "List all private scheduled actions.", + "externalDocs": { + "url": "https://docs.microsoft.com/rest/api/cost-management/" + }, + "x-ms-examples": { + "PrivateScheduledActionsList": { + "$ref": "./examples/scheduledActions-list-private.json" + }, + "PrivateScheduledActionsListFilterByViewId": { + "$ref": "./examples/scheduledActions-listWithFilter-private.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "name": "$filter", + "description": "May be used to filter scheduled actions by properties/viewId. Supported operator is 'eq'.", + "in": "query", + "required": false, + "type": "string" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/ScheduledActionListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/{scope}/providers/Microsoft.CostManagement/scheduledActions": { + "get": { + "tags": [ + "ScheduledActions" + ], + "operationId": "ScheduledActions_ListByScope", + "description": "List all shared scheduled actions within the given scope.", + "externalDocs": { + "url": "https://docs.microsoft.com/rest/api/cost-management/" + }, + "x-ms-examples": { + "ScheduledActionsListByScope": { + "$ref": "./examples/scheduledActions-list-shared.json" + }, + "ScheduledActionsListByScopeFilterByViewId": { + "$ref": "./examples/scheduledActions-listWithFilter-shared.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/scopeParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "name": "$filter", + "description": "May be used to filter scheduled actions by properties/viewId. Supported operator is 'eq'.", + "in": "query", + "required": false, + "type": "string" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/ScheduledActionListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/providers/Microsoft.CostManagement/scheduledActions/{name}": { + "put": { + "tags": [ + "ScheduledActions" + ], + "operationId": "ScheduledActions_CreateOrUpdate", + "description": "Create or update a private scheduled action.", + "x-ms-examples": { + "CreateOrUpdatePrivateScheduledAction": { + "$ref": "./examples/scheduledAction-createOrUpdate-private.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/scheduledActionNameParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "name": "scheduledAction", + "description": "Scheduled action to be created or updated.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ScheduledAction" + } + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/ScheduledAction" + } + }, + "201": { + "description": "Created.", + "schema": { + "$ref": "#/definitions/ScheduledAction" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "get": { + "tags": [ + "ScheduledActions" + ], + "operationId": "ScheduledActions_Get", + "description": "Get the private scheduled action by name.", + "externalDocs": { + "url": "https://docs.microsoft.com/rest/api/cost-management/" + }, + "x-ms-examples": { + "PrivateScheduledAction": { + "$ref": "./examples/scheduledAction-get-private.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/scheduledActionNameParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/ScheduledAction" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "delete": { + "tags": [ + "ScheduledActions" + ], + "operationId": "ScheduledActions_Delete", + "description": "Delete a private scheduled action.", + "externalDocs": { + "url": "https://docs.microsoft.com/rest/api/cost-management/" + }, + "x-ms-examples": { + "PrivateScheduledActionDelete": { + "$ref": "./examples/scheduledAction-delete-private.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/scheduledActionNameParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded." + }, + "204": { + "description": "NoContent. Resource is not available." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/{scope}/providers/Microsoft.CostManagement/scheduledActions/{name}": { + "put": { + "tags": [ + "ScheduledActions" + ], + "operationId": "ScheduledActions_CreateOrUpdateByScope", + "description": "Create or update a shared scheduled action within the given scope.", + "x-ms-examples": { + "CreateOrUpdateScheduledActionByScope": { + "$ref": "./examples/scheduledAction-createOrUpdate-shared.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/scopeParameter" + }, + { + "$ref": "#/parameters/scheduledActionNameParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "name": "scheduledAction", + "description": "Scheduled action to be created or updated.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ScheduledAction" + } + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/ScheduledAction" + } + }, + "201": { + "description": "Created.", + "schema": { + "$ref": "#/definitions/ScheduledAction" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "get": { + "tags": [ + "ScheduledActions" + ], + "operationId": "ScheduledActions_GetByScope", + "description": "Get the shared scheduled action from the given scope by name.", + "externalDocs": { + "url": "https://docs.microsoft.com/rest/api/cost-management/" + }, + "x-ms-examples": { + "ScheduledActionByScope": { + "$ref": "./examples/scheduledAction-get-shared.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/scopeParameter" + }, + { + "$ref": "#/parameters/scheduledActionNameParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/ScheduledAction" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "delete": { + "tags": [ + "ScheduledActions" + ], + "operationId": "ScheduledActions_DeleteByScope", + "description": "Delete a scheduled action within the given scope.", + "externalDocs": { + "url": "https://docs.microsoft.com/rest/api/cost-management/" + }, + "x-ms-examples": { + "ScheduledActionDeleteByScope": { + "$ref": "./examples/scheduledAction-delete-shared.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/scopeParameter" + }, + { + "$ref": "#/parameters/scheduledActionNameParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded." + }, + "204": { + "description": "NoContent. Resource is not available." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/providers/Microsoft.CostManagement/scheduledActions/{name}/execute": { + "post": { + "tags": [ + "ScheduledActions" + ], + "operationId": "ScheduledActions_Execute", + "description": "Execute a private scheduled action.", + "x-ms-examples": { + "ScheduledActionExecute": { + "$ref": "./examples/scheduledAction-execute-private.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/scheduledActionNameParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded. It might take up to an hour to receive the email." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/{scope}/providers/Microsoft.CostManagement/scheduledActions/{name}/execute": { + "post": { + "tags": [ + "ScheduledActions" + ], + "operationId": "ScheduledActions_ExecuteByScope", + "description": "Execute a shared scheduled action within the given scope.", + "x-ms-examples": { + "ScheduledActionExecuteByScope": { + "$ref": "./examples/scheduledAction-execute-shared.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/scopeParameter" + }, + { + "$ref": "#/parameters/scheduledActionNameParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded. It might take up to an hour to receive cost analysis information." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/providers/Microsoft.CostManagement/checkNameAvailability": { + "post": { + "tags": [ + "ScheduledActions" + ], + "operationId": "ScheduledActions_CheckNameAvailability", + "description": "Checks availability and correctness of the name for a scheduled action.", + "x-ms-examples": { + "ScheduledActionCheckNameAvailability": { + "$ref": "./examples/checkNameAvailability-private-scheduledAction.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "name": "checkNameAvailabilityRequest", + "description": "Scheduled action to be created or updated.", + "in": "body", + "required": true, + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/CheckNameAvailabilityRequest" + } + } + ], + "responses": { + "200": { + "description": "Response of scheduled action name availability.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/CheckNameAvailabilityResponse" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/{scope}/providers/Microsoft.CostManagement/checkNameAvailability": { + "post": { + "tags": [ + "ScheduledActions" + ], + "operationId": "ScheduledActions_CheckNameAvailabilityByScope", + "description": "Checks availability and correctness of the name for a scheduled action within the given scope.", + "x-ms-examples": { + "ScheduledActionCheckNameAvailabilityByScope": { + "$ref": "./examples/checkNameAvailability-shared-scheduledAction.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/scopeParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "name": "checkNameAvailabilityRequest", + "description": "Scheduled action to be created or updated.", + "in": "body", + "required": true, + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/CheckNameAvailabilityRequest" + } + } + ], + "responses": { + "200": { + "description": "Response of scheduled action name availability.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/CheckNameAvailabilityResponse" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + } + }, + "definitions": { + "DaysOfWeek": { + "type": "string", + "description": "Days of Week.", + "enum": [ + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday", + "Sunday" + ], + "x-ms-enum": { + "name": "DaysOfWeek", + "modelAsString": true + } + }, + "ErrorResponse": { + "description": "Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message. \n\nSome Error responses: \n\n * 429 TooManyRequests - Request is throttled. Retry after waiting for the time specified in the \"x-ms-ratelimit-microsoft.consumption-retry-after\" header. \n\n * 503 ServiceUnavailable - Service is temporarily unavailable. Retry after waiting for the time specified in the \"Retry-After\" header.", + "type": "object", + "properties": { + "error": { + "description": "The details of the error.", + "$ref": "#/definitions/ErrorDetails" + } + } + }, + "ErrorDetails": { + "description": "The details of the error.", + "type": "object", + "properties": { + "code": { + "description": "Error code.", + "type": "string", + "readOnly": true + }, + "message": { + "description": "Error message indicating why the operation failed.", + "type": "string", + "readOnly": true + } + } + }, + "FileDestination": { + "type": "object", + "description": "Destination of the view data. Currently only csv format is supported.", + "properties": { + "fileFormats": { + "type": "array", + "description": "Destination of the view data. Currently only csv format is supported.", + "items": { + "$ref": "#/definitions/FileFormat" + } + } + } + }, + "FileFormat": { + "type": "string", + "description": "Destination of the view data. Currently only csv format is supported.", + "enum": [ + "Csv" + ], + "x-ms-enum": { + "name": "FileFormat", + "modelAsString": true + } + }, + "NotificationProperties": { + "type": "object", + "description": "The properties of the scheduled action notification.", + "required": [ + "to", + "subject" + ], + "properties": { + "to": { + "description": "Array of email addresses.", + "type": "array", + "items": { + "type": "string", + "pattern": "^[A-Za-z0-9._%+-]+@(?:[A-Za-z0-9-]+\\.)+[A-Za-z]{2,}$" + }, + "minItems": 1, + "maxItems": 20 + }, + "message": { + "description": "Optional message to be added in the email. Length is limited to 250 characters.", + "type": "string" + }, + "subject": { + "description": "Subject of the email. Length is limited to 70 characters.", + "type": "string" + } + } + }, + "ScheduledActionProxyResource": { + "description": "The Resource model definition.", + "properties": { + "id": { + "readOnly": true, + "type": "string", + "description": "Resource Id." + }, + "name": { + "readOnly": true, + "type": "string", + "description": "Resource name." + }, + "type": { + "readOnly": true, + "type": "string", + "description": "Resource type." + }, + "eTag": { + "type": "string", + "readOnly": true, + "description": "Resource Etag." + }, + "kind": { + "$ref": "#/definitions/ScheduledActionKind", + "description": "Kind of the scheduled action." + }, + "systemData": { + "readOnly": true, + "type": "object", + "description": "Azure Resource Manager metadata containing createdBy and modifiedBy information.", + "$ref": "#/definitions/systemData" + } + }, + "type": "object", + "x-ms-azure-resource": true + }, + "ScheduledAction": { + "description": "Scheduled action definition.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ScheduledActionProxyResource" + } + ], + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/ScheduledActionProperties", + "title": "Scheduled action properties" + } + } + }, + "ScheduledActionKind": { + "type": "string", + "description": "Kind of the scheduled action.", + "enum": [ + "Email" + ], + "x-ms-enum": { + "name": "ScheduledActionKind", + "modelAsString": true, + "values": [ + { + "value": "Email", + "description": "Cost analysis data will be emailed.", + "name": "Email" + } + ] + } + }, + "ScheduledActionListResult": { + "description": "Scheduled actions list result. It contains a list of scheduled actions.", + "type": "object", + "properties": { + "value": { + "description": "The list of scheduled actions.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/ScheduledAction" + } + }, + "nextLink": { + "description": "The link (url) to the next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "ScheduledActionProperties": { + "type": "object", + "description": "The properties of the scheduled action.", + "required": [ + "displayName", + "notification", + "schedule", + "status", + "viewId" + ], + "properties": { + "displayName": { + "description": "Scheduled action name.", + "type": "string" + }, + "fileDestination": { + "description": "Destination format of the view data.", + "$ref": "#/definitions/FileDestination" + }, + "notification": { + "description": "Notification properties based on scheduled action kind.", + "$ref": "#/definitions/NotificationProperties" + }, + "schedule": { + "description": "Schedule of the scheduled action.", + "$ref": "#/definitions/ScheduleProperties" + }, + "scope": { + "description": "Cost Management scope like 'subscriptions/{subscriptionId}' for subscription scope, 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for BillingProfile scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for InvoiceSection scope, '/providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for ExternalBillingAccount scope, and '/providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for ExternalSubscription scope.", + "type": "string" + }, + "status": { + "$ref": "#/definitions/ScheduledActionStatus", + "description": "Status of the scheduled action." + }, + "viewId": { + "description": "Cost analysis viewId used for scheduled action. For example, '/providers/Microsoft.CostManagement/views/swaggerExample'", + "type": "string" + } + } + }, + "ScheduledActionStatus": { + "type": "string", + "description": "Status of the scheduled action.", + "enum": [ + "Enabled", + "Disabled" + ], + "x-ms-enum": { + "name": "ScheduledActionStatus", + "modelAsString": true, + "values": [ + { + "value": "Disabled", + "description": "Scheduled action is saved but will not be executed.", + "name": "Disabled" + }, + { + "value": "Enabled", + "description": "Scheduled action is saved and will be executed.", + "name": "Enabled" + } + ] + } + }, + "ScheduleFrequency": { + "type": "string", + "description": "Frequency of the schedule.", + "enum": [ + "Daily", + "Weekly", + "Monthly" + ], + "x-ms-enum": { + "name": "ScheduleFrequency", + "modelAsString": true, + "values": [ + { + "value": "Daily", + "description": "Cost analysis data will be emailed every day.", + "name": "Daily" + }, + { + "value": "Weekly", + "description": "Cost analysis data will be emailed every week.", + "name": "Weekly" + }, + { + "value": "Monthly", + "description": "Cost analysis data will be emailed every month.", + "name": "Monthly" + } + ] + } + }, + "ScheduleProperties": { + "type": "object", + "description": "The properties of the schedule.", + "required": [ + "endDate", + "frequency", + "startDate" + ], + "properties": { + "frequency": { + "$ref": "#/definitions/ScheduleFrequency", + "description": "Frequency of the schedule." + }, + "hourOfDay": { + "type": "integer", + "description": "UTC time at which cost analysis data will be emailed.", + "format": "int32" + }, + "daysOfWeek": { + "description": "Day names in english on which cost analysis data will be emailed. This property is applicable when frequency is Weekly or Monthly.", + "type": "array", + "items": { + "$ref": "#/definitions/DaysOfWeek" + } + }, + "weeksOfMonth": { + "description": "Weeks in which cost analysis data will be emailed. This property is applicable when frequency is Monthly and used in combination with daysOfWeek.", + "type": "array", + "items": { + "$ref": "#/definitions/WeeksOfMonth" + } + }, + "dayOfMonth": { + "type": "integer", + "description": "UTC day on which cost analysis data will be emailed. Must be between 1 and 31. This property is applicable when frequency is Monthly and overrides weeksOfMonth or daysOfWeek.", + "format": "int32" + }, + "startDate": { + "description": "The start date and time of the scheduled action (UTC).", + "type": "string", + "format": "date-time" + }, + "endDate": { + "description": "The end date and time of the scheduled action (UTC).", + "type": "string", + "format": "date-time" + } + } + }, + "systemData": { + "description": "Metadata pertaining to creation and last modification of the resource.", + "type": "object", + "readOnly": true, + "properties": { + "createdBy": { + "type": "string", + "description": "The identity that created the resource." + }, + "createdByType": { + "type": "string", + "description": "The type of identity that created the resource.", + "enum": [ + "User", + "Application", + "ManagedIdentity", + "Key" + ], + "x-ms-enum": { + "name": "createdByType", + "modelAsString": true + } + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "The timestamp of resource creation (UTC)." + }, + "lastModifiedBy": { + "type": "string", + "description": "The identity that last modified the resource." + }, + "lastModifiedByType": { + "type": "string", + "description": "The type of identity that last modified the resource.", + "enum": [ + "User", + "Application", + "ManagedIdentity", + "Key" + ], + "x-ms-enum": { + "name": "createdByType", + "modelAsString": true + } + }, + "lastModifiedAt": { + "type": "string", + "format": "date-time", + "description": "The timestamp of resource last modification (UTC)" + } + } + }, + "WeeksOfMonth": { + "type": "string", + "description": "Weeks of month.", + "enum": [ + "First", + "Second", + "Third", + "Fourth", + "Last" + ], + "x-ms-enum": { + "name": "WeeksOfMonth", + "modelAsString": true + } + } + }, + "parameters": { + "apiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "Version of the API to be used with the client request." + }, + "scopeParameter": { + "name": "scope", + "in": "path", + "required": true, + "type": "string", + "description": "The scope associated with scheduled action operations. This includes 'subscriptions/{subscriptionId}' for subscription scope, 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for BillingProfile scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for InvoiceSection scope, 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for External Billing Account scope and 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for External Subscription scope.", + "x-ms-parameter-location": "method" + }, + "scheduledActionNameParameter": { + "name": "name", + "in": "path", + "description": "Scheduled action name.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/cost-management/resource-manager/readme.md b/specification/cost-management/resource-manager/readme.md index c9551807a56f..644ca582d5b7 100644 --- a/specification/cost-management/resource-manager/readme.md +++ b/specification/cost-management/resource-manager/readme.md @@ -40,16 +40,27 @@ input-file: - Microsoft.CostManagement/preview/2022-02-01-preview/costmanagement.pricesheets.json ``` +### Tag: package-preview-2022-04 + +These settings apply only when `--tag=package-preview-2022-04` is specified on the command line. + +```yaml $(tag) == 'package-preview-2022-04' +input-file: + - Microsoft.CostManagement/preview/2022-04-01-preview/scheduledActions.json + - Microsoft.CostManagement/stable/2021-10-01/costmanagement.json + - Microsoft.CostManagement/stable/2021-10-01/costmanagement.exports.json +``` ### Tag: package-2021-10 These settings apply only when `--tag=package-2021-10` is specified on the command line. -```yaml $(tag) == 'package-2021-10' +``` yaml $(tag) == 'package-2021-10' input-file: - Microsoft.CostManagement/stable/2021-10-01/costmanagement.exports.json - Microsoft.CostManagement/stable/2021-10-01/costmanagement.generatedetailedcostreport.json - Microsoft.CostManagement/stable/2021-10-01/costmanagement.json ``` + ### Tag: package-2021-01 These settings apply only when `--tag=package-2021-01` is specified on the command line.