From 0b51f65730933fdfa1d54037a03ddadd4939e065 Mon Sep 17 00:00:00 2001 From: Nishanth M <33050351+nishanthm-msft@users.noreply.github.com> Date: Wed, 18 Oct 2023 10:29:54 +0530 Subject: [PATCH] [Microsoft.Workoads] Initialize connectors for 2023-10-01-preview api version (#26099) * Initialize connectors for 2023-10-01-preview api verison * add unknown words to custom-words * fix linter checks * additional fixes for linter checks * remove 200 response for delete LROs * update examples to remove 200 from delete LROs --------- Co-authored-by: Nishanth M --- custom-words.txt | 2 + .../2023-10-01-preview/backupTypes.json | 849 +++++++++++++ .../2023-10-01-preview/connectors.json | 1098 +++++++++++++++++ .../ACSSBackup/DB_Existing_Create.json | 87 ++ .../examples/ACSSBackup/DB_New_Create.json | 234 ++++ .../examples/ACSSBackup/Delete.json | 22 + .../examples/ACSSBackup/Get.json | 48 + .../examples/ACSSBackup/HANA_NewPolicy.json | 589 +++++++++ .../examples/ACSSBackup/List.json | 83 ++ .../examples/ACSSBackup/SQL_NewPolicy.json | 462 +++++++ .../examples/ACSSBackup/Update.json | 55 + .../ACSSBackup/VM_Existing_Create.json | 99 ++ .../examples/ACSSBackup/VM_NewPolicy.json | 375 ++++++ .../examples/ACSSBackup/VM_New_Create.json | 180 +++ .../examples/connectors/Create.json | 59 + .../examples/connectors/Delete.json | 21 + .../examples/connectors/Get.json | 31 + .../connectors/ListByResourceGroup.json | 53 + .../connectors/ListBySubscription.json | 52 + .../examples/connectors/Update.json | 38 + .../connectors/readme.az.md | 16 + .../connectors/readme.cli.md | 1 + .../connectors/readme.csharp.md | 14 + .../connectors/readme.go.md | 11 + .../Microsoft.Workloads/connectors/readme.md | 83 ++ .../connectors/readme.python.md | 19 + .../connectors/readme.typescript.md | 14 + 27 files changed, 4595 insertions(+) create mode 100644 specification/workloads/resource-manager/Microsoft.Workloads/connectors/preview/2023-10-01-preview/backupTypes.json create mode 100644 specification/workloads/resource-manager/Microsoft.Workloads/connectors/preview/2023-10-01-preview/connectors.json create mode 100644 specification/workloads/resource-manager/Microsoft.Workloads/connectors/preview/2023-10-01-preview/examples/ACSSBackup/DB_Existing_Create.json create mode 100644 specification/workloads/resource-manager/Microsoft.Workloads/connectors/preview/2023-10-01-preview/examples/ACSSBackup/DB_New_Create.json create mode 100644 specification/workloads/resource-manager/Microsoft.Workloads/connectors/preview/2023-10-01-preview/examples/ACSSBackup/Delete.json create mode 100644 specification/workloads/resource-manager/Microsoft.Workloads/connectors/preview/2023-10-01-preview/examples/ACSSBackup/Get.json create mode 100644 specification/workloads/resource-manager/Microsoft.Workloads/connectors/preview/2023-10-01-preview/examples/ACSSBackup/HANA_NewPolicy.json create mode 100644 specification/workloads/resource-manager/Microsoft.Workloads/connectors/preview/2023-10-01-preview/examples/ACSSBackup/List.json create mode 100644 specification/workloads/resource-manager/Microsoft.Workloads/connectors/preview/2023-10-01-preview/examples/ACSSBackup/SQL_NewPolicy.json create mode 100644 specification/workloads/resource-manager/Microsoft.Workloads/connectors/preview/2023-10-01-preview/examples/ACSSBackup/Update.json create mode 100644 specification/workloads/resource-manager/Microsoft.Workloads/connectors/preview/2023-10-01-preview/examples/ACSSBackup/VM_Existing_Create.json create mode 100644 specification/workloads/resource-manager/Microsoft.Workloads/connectors/preview/2023-10-01-preview/examples/ACSSBackup/VM_NewPolicy.json create mode 100644 specification/workloads/resource-manager/Microsoft.Workloads/connectors/preview/2023-10-01-preview/examples/ACSSBackup/VM_New_Create.json create mode 100644 specification/workloads/resource-manager/Microsoft.Workloads/connectors/preview/2023-10-01-preview/examples/connectors/Create.json create mode 100644 specification/workloads/resource-manager/Microsoft.Workloads/connectors/preview/2023-10-01-preview/examples/connectors/Delete.json create mode 100644 specification/workloads/resource-manager/Microsoft.Workloads/connectors/preview/2023-10-01-preview/examples/connectors/Get.json create mode 100644 specification/workloads/resource-manager/Microsoft.Workloads/connectors/preview/2023-10-01-preview/examples/connectors/ListByResourceGroup.json create mode 100644 specification/workloads/resource-manager/Microsoft.Workloads/connectors/preview/2023-10-01-preview/examples/connectors/ListBySubscription.json create mode 100644 specification/workloads/resource-manager/Microsoft.Workloads/connectors/preview/2023-10-01-preview/examples/connectors/Update.json create mode 100644 specification/workloads/resource-manager/Microsoft.Workloads/connectors/readme.az.md create mode 100644 specification/workloads/resource-manager/Microsoft.Workloads/connectors/readme.cli.md create mode 100644 specification/workloads/resource-manager/Microsoft.Workloads/connectors/readme.csharp.md create mode 100644 specification/workloads/resource-manager/Microsoft.Workloads/connectors/readme.go.md create mode 100644 specification/workloads/resource-manager/Microsoft.Workloads/connectors/readme.md create mode 100644 specification/workloads/resource-manager/Microsoft.Workloads/connectors/readme.python.md create mode 100644 specification/workloads/resource-manager/Microsoft.Workloads/connectors/readme.typescript.md diff --git a/custom-words.txt b/custom-words.txt index 96ee0f947938..094e1ea450ee 100644 --- a/custom-words.txt +++ b/custom-words.txt @@ -515,6 +515,7 @@ cololocation columnstore commandshistory commitmentplans +commoncrypto compat compilationjobs compilefile @@ -2356,6 +2357,7 @@ salinuxvm sami saml santali +sapsrv saql saskey sasl diff --git a/specification/workloads/resource-manager/Microsoft.Workloads/connectors/preview/2023-10-01-preview/backupTypes.json b/specification/workloads/resource-manager/Microsoft.Workloads/connectors/preview/2023-10-01-preview/backupTypes.json new file mode 100644 index 000000000000..5856b4f49404 --- /dev/null +++ b/specification/workloads/resource-manager/Microsoft.Workloads/connectors/preview/2023-10-01-preview/backupTypes.json @@ -0,0 +1,849 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-10-01-preview", + "title": "Workloads Client", + "description": "The recovery services backup policy models required for connector service." + }, + "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": {}, + "definitions": { + "AzureIaaSVMProtectionPolicy": { + "description": "IaaS VM workload-specific backup policy.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ProtectionPolicy" + } + ], + "properties": { + "instantRPDetails": { + "$ref": "#/definitions/InstantRPAdditionalDetails" + }, + "schedulePolicy": { + "$ref": "#/definitions/SchedulePolicy", + "description": "Backup schedule specified as part of backup policy." + }, + "retentionPolicy": { + "$ref": "#/definitions/RetentionPolicy", + "description": "Retention policy with the details on backup copy retention ranges." + }, + "tieringPolicy": { + "description": "Tiering policy to automatically move RPs to another tier\r\nKey is Target Tier, defined in RecoveryPointTierType enum.\r\nTiering policy specifies the criteria to move RP to the target tier.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/TieringPolicy" + } + }, + "instantRpRetentionRangeInDays": { + "format": "int32", + "description": "Instant RP retention policy range in days", + "type": "integer" + }, + "timeZone": { + "description": "Time zone optional input as string. For example: \"Pacific Standard Time\".", + "type": "string" + }, + "policyType": { + "description": "The policy type.", + "enum": [ + "Invalid", + "V1", + "V2" + ], + "x-enum-descriptions": [ + "Invalid Azure IaaS VM Protection Policy type", + "V1 Azure IaaS VM Protection Policy type", + "V2 Azure IaaS VM Protection Policy type" + ], + "type": "string", + "x-ms-enum": { + "name": "IAASVMPolicyType", + "modelAsString": true + } + } + }, + "x-ms-discriminator-value": "AzureIaasVM" + }, + "ProtectionPolicy": { + "description": "Base class for backup policy. Workload-specific backup policies are derived from this class.", + "required": [ + "backupManagementType" + ], + "type": "object", + "properties": { + "protectedItemsCount": { + "format": "int32", + "description": "Number of items associated with this policy.", + "type": "integer" + }, + "backupManagementType": { + "description": "This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.", + "type": "string" + }, + "resourceGuardOperationRequests": { + "description": "ResourceGuard Operation Requests", + "type": "array", + "items": { + "type": "string" + } + } + }, + "discriminator": "backupManagementType" + }, + "InstantRPAdditionalDetails": { + "type": "object", + "description": "Instant recovery point additional details.", + "properties": { + "azureBackupRGNamePrefix": { + "description": "Azure backup resource group name prefix.", + "type": "string" + }, + "azureBackupRGNameSuffix": { + "description": "Azure backup resource group name suffix.", + "type": "string" + } + } + }, + "SchedulePolicy": { + "description": "Base class for backup schedule.", + "required": [ + "schedulePolicyType" + ], + "type": "object", + "properties": { + "schedulePolicyType": { + "description": "This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.", + "type": "string" + } + }, + "discriminator": "schedulePolicyType" + }, + "RetentionPolicy": { + "description": "Base class for retention policy.", + "required": [ + "retentionPolicyType" + ], + "type": "object", + "properties": { + "retentionPolicyType": { + "description": "This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.", + "type": "string" + } + }, + "discriminator": "retentionPolicyType" + }, + "AzureVmWorkloadProtectionPolicy": { + "description": "Azure VM (Mercury) workload-specific backup policy.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ProtectionPolicy" + } + ], + "properties": { + "workLoadType": { + "description": "Type of workload for the backup management", + "enum": [ + "Invalid", + "VM", + "FileFolder", + "AzureSqlDb", + "SQLDB", + "Exchange", + "Sharepoint", + "VMwareVM", + "SystemState", + "Client", + "GenericDataSource", + "SQLDataBase", + "AzureFileShare", + "SAPHanaDatabase", + "SAPAseDatabase", + "SAPHanaDBInstance" + ], + "type": "string", + "x-ms-enum": { + "name": "WorkloadType", + "modelAsString": true + } + }, + "settings": { + "$ref": "#/definitions/Settings", + "description": "Common settings for the backup management" + }, + "subProtectionPolicy": { + "description": "List of sub-protection policies which includes schedule and retention", + "type": "array", + "items": { + "$ref": "#/definitions/SubProtectionPolicy" + }, + "x-ms-identifiers": [] + }, + "makePolicyConsistent": { + "description": "Fix the policy inconsistency", + "type": "boolean" + } + }, + "x-ms-discriminator-value": "AzureWorkload" + }, + "Settings": { + "description": "Common settings field for backup management", + "type": "object", + "properties": { + "timeZone": { + "description": "TimeZone optional input as string. For example: TimeZone = \"Pacific Standard Time\".", + "type": "string" + }, + "issqlcompression": { + "description": "SQL compression flag", + "type": "boolean" + }, + "isCompression": { + "description": "Workload compression flag. This has been added so that 'isSqlCompression'\r\nwill be deprecated once clients upgrade to consider this flag.", + "type": "boolean" + } + } + }, + "SubProtectionPolicy": { + "description": "Sub-protection policy which includes schedule and retention", + "type": "object", + "properties": { + "policyType": { + "description": "Type of backup policy type", + "enum": [ + "Invalid", + "Full", + "Differential", + "Log", + "CopyOnlyFull", + "Incremental", + "SnapshotFull", + "SnapshotCopyOnlyFull" + ], + "type": "string", + "x-ms-enum": { + "name": "PolicyType", + "modelAsString": true + } + }, + "schedulePolicy": { + "$ref": "#/definitions/SchedulePolicy", + "description": "Backup schedule specified as part of backup policy." + }, + "retentionPolicy": { + "$ref": "#/definitions/RetentionPolicy", + "description": "Retention policy with the details on backup copy retention ranges." + }, + "tieringPolicy": { + "description": "Tiering policy to automatically move RPs to another tier.\r\nKey is Target Tier, defined in RecoveryPointTierType enum.\r\nTiering policy specifies the criteria to move RP to the target tier.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/TieringPolicy" + } + }, + "snapshotBackupAdditionalDetails": { + "$ref": "#/definitions/SnapshotBackupAdditionalDetails", + "description": "Hana DB instance snapshot backup additional details." + } + } + }, + "TieringPolicy": { + "description": "Tiering Policy for a target tier.\r\nIf the policy is not specified for a given target tier, service retains the existing configured tiering policy for that tier", + "type": "object", + "properties": { + "tieringMode": { + "description": "Tiering Mode to control automatic tiering of recovery points. Supported values are:\r\n1. TierRecommended: Tier all recovery points recommended to be tiered\r\n2. TierAfter: Tier all recovery points after a fixed period, as specified in duration + durationType below.\r\n3. DoNotTier: Do not tier any recovery points", + "enum": [ + "Invalid", + "TierRecommended", + "TierAfter", + "DoNotTier" + ], + "type": "string", + "x-ms-enum": { + "name": "TieringMode", + "modelAsString": true + } + }, + "duration": { + "format": "int32", + "description": "Number of days/weeks/months/years to retain backups in current tier before tiering.\r\nUsed only if TieringMode is set to TierAfter", + "type": "integer" + }, + "durationType": { + "description": "Retention duration type: days/weeks/months/years\r\nUsed only if TieringMode is set to TierAfter", + "enum": [ + "Invalid", + "Days", + "Weeks", + "Months", + "Years" + ], + "type": "string", + "x-ms-enum": { + "name": "RetentionDurationType", + "modelAsString": true + } + } + } + }, + "UserAssignedIdentityProperties": { + "description": "User assigned managed identity properties.", + "type": "object", + "properties": { + "clientId": { + "type": "string" + }, + "principalId": { + "type": "string" + } + } + }, + "UserAssignedManagedIdentityDetails": { + "description": "User assigned managed identity details.", + "type": "object", + "properties": { + "identityArmId": { + "type": "string" + }, + "identityName": { + "type": "string" + }, + "userAssignedIdentityProperties": { + "$ref": "#/definitions/UserAssignedIdentityProperties" + } + } + }, + "SimpleSchedulePolicy": { + "description": "Simple policy schedule.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/SchedulePolicy" + } + ], + "properties": { + "scheduleRunFrequency": { + "description": "Frequency of the schedule operation of this policy.", + "enum": [ + "Invalid", + "Daily", + "Weekly", + "Hourly" + ], + "type": "string", + "x-ms-enum": { + "name": "ScheduleRunType", + "modelAsString": true + } + }, + "scheduleRunDays": { + "description": "List of days of week this schedule has to be run.", + "type": "array", + "items": { + "enum": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "type": "string", + "x-ms-enum": { + "name": "DayOfWeek", + "modelAsString": false + } + } + }, + "scheduleRunTimes": { + "description": "List of times of day this schedule has to be run.", + "type": "array", + "items": { + "format": "date-time", + "type": "string" + } + }, + "hourlySchedule": { + "$ref": "#/definitions/HourlySchedule", + "description": "Hourly Schedule of this Policy" + }, + "scheduleWeeklyFrequency": { + "format": "int32", + "description": "At every number weeks this schedule has to be run.", + "type": "integer" + } + }, + "x-ms-discriminator-value": "SimpleSchedulePolicy" + }, + "SimpleSchedulePolicyV2": { + "description": "The V2 policy schedule for IaaS that supports hourly backups.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/SchedulePolicy" + } + ], + "properties": { + "scheduleRunFrequency": { + "description": "Frequency of the schedule operation of this policy.", + "enum": [ + "Invalid", + "Daily", + "Weekly", + "Hourly" + ], + "type": "string", + "x-ms-enum": { + "name": "ScheduleRunType", + "modelAsString": true + } + }, + "hourlySchedule": { + "$ref": "#/definitions/HourlySchedule", + "description": "hourly schedule of this policy" + }, + "dailySchedule": { + "$ref": "#/definitions/DailySchedule", + "description": "Daily schedule of this policy" + }, + "weeklySchedule": { + "$ref": "#/definitions/WeeklySchedule", + "description": "Weekly schedule of this policy" + } + }, + "x-ms-discriminator-value": "SimpleSchedulePolicyV2" + }, + "SnapshotBackupAdditionalDetails": { + "description": "Snapshot Backup related fields for WorkloadType SAP Hana system", + "type": "object", + "properties": { + "instantRpRetentionRangeInDays": { + "format": "int32", + "description": "Retention range for instant Rp in days.", + "type": "integer" + }, + "instantRPDetails": { + "description": "Instant RP details for the snapshot.", + "type": "string" + }, + "userAssignedManagedIdentityDetails": { + "$ref": "#/definitions/UserAssignedManagedIdentityDetails", + "description": "User Assigned managed identity details used for snapshot policy." + } + } + }, + "HourlySchedule": { + "type": "object", + "description": "Hourly schedule.", + "properties": { + "interval": { + "format": "int32", + "description": "Interval at which backup needs to be triggered. For hourly the value\r\n can be 4/6/8/12", + "type": "integer" + }, + "scheduleWindowStartTime": { + "format": "date-time", + "description": "To specify start time of the backup window", + "type": "string" + }, + "scheduleWindowDuration": { + "format": "int32", + "description": "To specify duration of the backup window", + "type": "integer" + } + } + }, + "DailySchedule": { + "type": "object", + "description": "Daily schedule.", + "properties": { + "scheduleRunTimes": { + "description": "List of times of day this schedule has to be run.", + "type": "array", + "items": { + "format": "date-time", + "type": "string" + } + } + } + }, + "WeeklySchedule": { + "type": "object", + "description": "Weekly schedule.", + "properties": { + "scheduleRunDays": { + "type": "array", + "description": "Schedule run days.", + "items": { + "enum": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "type": "string", + "x-ms-enum": { + "name": "DayOfWeek", + "modelAsString": false + } + } + }, + "scheduleRunTimes": { + "description": "List of times of day this schedule has to be run.", + "type": "array", + "items": { + "format": "date-time", + "type": "string" + } + } + } + }, + "LongTermRetentionPolicy": { + "description": "Long term retention policy.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/RetentionPolicy" + } + ], + "properties": { + "dailySchedule": { + "$ref": "#/definitions/DailyRetentionSchedule", + "description": "Daily retention schedule of the protection policy." + }, + "weeklySchedule": { + "$ref": "#/definitions/WeeklyRetentionSchedule", + "description": "Weekly retention schedule of the protection policy." + }, + "monthlySchedule": { + "$ref": "#/definitions/MonthlyRetentionSchedule", + "description": "Monthly retention schedule of the protection policy." + }, + "yearlySchedule": { + "$ref": "#/definitions/YearlyRetentionSchedule", + "description": "Yearly retention schedule of the protection policy." + } + }, + "x-ms-discriminator-value": "LongTermRetentionPolicy" + }, + "LongTermSchedulePolicy": { + "description": "Long term policy schedule.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/SchedulePolicy" + } + ], + "x-ms-discriminator-value": "LongTermSchedulePolicy" + }, + "LogSchedulePolicy": { + "description": "Log policy schedule.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/SchedulePolicy" + } + ], + "properties": { + "scheduleFrequencyInMins": { + "format": "int32", + "description": "Frequency of the log schedule operation of this policy in minutes.", + "type": "integer" + } + }, + "x-ms-discriminator-value": "LogSchedulePolicy" + }, + "SimpleRetentionPolicy": { + "description": "Simple policy retention.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/RetentionPolicy" + } + ], + "properties": { + "retentionDuration": { + "$ref": "#/definitions/RetentionDuration", + "description": "Retention duration of the protection policy." + } + }, + "x-ms-discriminator-value": "SimpleRetentionPolicy" + }, + "RetentionDuration": { + "description": "Retention duration.", + "type": "object", + "properties": { + "count": { + "format": "int32", + "description": "Count of duration types. Retention duration is obtained by the counting the duration type Count times.\r\nFor example, when Count = 3 and DurationType = Weeks, retention duration will be three weeks.", + "type": "integer" + }, + "durationType": { + "description": "Retention duration type of retention policy.", + "enum": [ + "Invalid", + "Days", + "Weeks", + "Months", + "Years" + ], + "type": "string", + "x-ms-enum": { + "name": "RetentionDurationType", + "modelAsString": true + } + } + } + }, + "DailyRetentionSchedule": { + "description": "Daily retention schedule.", + "type": "object", + "properties": { + "retentionTimes": { + "description": "Retention times of retention policy.", + "type": "array", + "items": { + "format": "date-time", + "type": "string" + } + }, + "retentionDuration": { + "$ref": "#/definitions/RetentionDuration", + "description": "Retention duration of retention Policy." + } + } + }, + "WeeklyRetentionSchedule": { + "description": "Weekly retention schedule.", + "type": "object", + "properties": { + "daysOfTheWeek": { + "description": "List of days of week for weekly retention policy.", + "type": "array", + "items": { + "enum": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "type": "string", + "x-ms-enum": { + "name": "DayOfWeek", + "modelAsString": false + } + } + }, + "retentionTimes": { + "description": "Retention times of retention policy.", + "type": "array", + "items": { + "format": "date-time", + "type": "string" + } + }, + "retentionDuration": { + "$ref": "#/definitions/RetentionDuration", + "description": "Retention duration of retention Policy." + } + } + }, + "MonthlyRetentionSchedule": { + "description": "Monthly retention schedule.", + "type": "object", + "properties": { + "retentionScheduleFormatType": { + "description": "Retention schedule format type for monthly retention policy.", + "enum": [ + "Invalid", + "Daily", + "Weekly" + ], + "type": "string", + "x-ms-enum": { + "name": "RetentionScheduleFormat", + "modelAsString": true + } + }, + "retentionScheduleDaily": { + "$ref": "#/definitions/DailyRetentionFormat", + "description": "Daily retention format for monthly retention policy." + }, + "retentionScheduleWeekly": { + "$ref": "#/definitions/WeeklyRetentionFormat", + "description": "Weekly retention format for monthly retention policy." + }, + "retentionTimes": { + "description": "Retention times of retention policy.", + "type": "array", + "items": { + "format": "date-time", + "type": "string" + } + }, + "retentionDuration": { + "$ref": "#/definitions/RetentionDuration", + "description": "Retention duration of retention Policy." + } + } + }, + "YearlyRetentionSchedule": { + "description": "Yearly retention schedule.", + "type": "object", + "properties": { + "retentionScheduleFormatType": { + "description": "Retention schedule format for yearly retention policy.", + "enum": [ + "Invalid", + "Daily", + "Weekly" + ], + "type": "string", + "x-ms-enum": { + "name": "RetentionScheduleFormat", + "modelAsString": true + } + }, + "monthsOfYear": { + "description": "List of months of year of yearly retention policy.", + "type": "array", + "items": { + "enum": [ + "Invalid", + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "type": "string", + "x-ms-enum": { + "name": "MonthOfYear", + "modelAsString": false + } + } + }, + "retentionScheduleDaily": { + "$ref": "#/definitions/DailyRetentionFormat", + "description": "Daily retention format for yearly retention policy." + }, + "retentionScheduleWeekly": { + "$ref": "#/definitions/WeeklyRetentionFormat", + "description": "Weekly retention format for yearly retention policy." + }, + "retentionTimes": { + "description": "Retention times of retention policy.", + "type": "array", + "items": { + "format": "date-time", + "type": "string" + } + }, + "retentionDuration": { + "$ref": "#/definitions/RetentionDuration", + "description": "Retention duration of retention Policy." + } + } + }, + "DailyRetentionFormat": { + "description": "Daily retention format.", + "type": "object", + "properties": { + "daysOfTheMonth": { + "description": "List of days of the month.", + "type": "array", + "items": { + "$ref": "#/definitions/Day" + }, + "x-ms-identifiers": [] + } + } + }, + "WeeklyRetentionFormat": { + "description": "Weekly retention format.", + "type": "object", + "properties": { + "daysOfTheWeek": { + "description": "List of days of the week.", + "type": "array", + "items": { + "enum": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "type": "string", + "x-ms-enum": { + "name": "DayOfWeek", + "modelAsString": false + } + } + }, + "weeksOfTheMonth": { + "description": "List of weeks of month.", + "type": "array", + "items": { + "enum": [ + "First", + "Second", + "Third", + "Fourth", + "Last", + "Invalid" + ], + "type": "string", + "x-ms-enum": { + "name": "WeekOfMonth", + "modelAsString": false + } + } + } + } + }, + "Day": { + "description": "Day of the week.", + "type": "object", + "properties": { + "date": { + "format": "int32", + "description": "Date of the month", + "type": "integer" + }, + "isLast": { + "description": "Whether Date is last date of month", + "type": "boolean" + } + } + } + } +} diff --git a/specification/workloads/resource-manager/Microsoft.Workloads/connectors/preview/2023-10-01-preview/connectors.json b/specification/workloads/resource-manager/Microsoft.Workloads/connectors/preview/2023-10-01-preview/connectors.json new file mode 100644 index 000000000000..abf111ad3466 --- /dev/null +++ b/specification/workloads/resource-manager/Microsoft.Workloads/connectors/preview/2023-10-01-preview/connectors.json @@ -0,0 +1,1098 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-10-01-preview", + "title": "Workloads Client", + "description": "The workloads connector client." + }, + "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": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/connectors/{connectorName}": { + "put": { + "tags": [ + "Connector" + ], + "operationId": "Connectors_Create", + "x-ms-examples": { + "Create a connector resource.": { + "$ref": "./examples/connectors/Create.json" + } + }, + "x-ms-long-running-operation": true, + "produces": [ + "application/json" + ], + "description": "Creates a connector resource", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ConnectorNameParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "in": "body", + "description": "Connector resource request body.", + "name": "body", + "schema": { + "$ref": "#/definitions/Connector" + } + } + ], + "responses": { + "201": { + "description": "Describes the connector resource created.", + "schema": { + "$ref": "#/definitions/Connector" + } + }, + "200": { + "description": "Describes the connector resource which is updated successfully.", + "schema": { + "$ref": "#/definitions/Connector" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + } + }, + "get": { + "tags": [ + "Connector" + ], + "operationId": "Connectors_Get", + "x-ms-examples": { + "Get the connector resource.": { + "$ref": "./examples/connectors/Get.json" + } + }, + "description": "Gets a connector resource", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ConnectorNameParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Describes the connector resource", + "schema": { + "$ref": "#/definitions/Connector" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + } + }, + "patch": { + "tags": [ + "Connector" + ], + "operationId": "Connectors_Update", + "x-ms-examples": { + "Update the connector resource.": { + "$ref": "./examples/connectors/Update.json" + } + }, + "description": "Updates a connector resource", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ConnectorNameParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "in": "body", + "name": "body", + "description": "Request body to update a connector resource.", + "schema": { + "$ref": "#/definitions/UpdateConnectorRequest" + } + } + ], + "responses": { + "200": { + "description": "Describes the connector resource which is successfully updated.", + "schema": { + "$ref": "#/definitions/Connector" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + } + }, + "delete": { + "tags": [ + "Connector" + ], + "operationId": "Connectors_Delete", + "x-ms-examples": { + "Delete the connector resource.": { + "$ref": "./examples/connectors/Delete.json" + } + }, + "x-ms-long-running-operation": true, + "produces": [ + "application/json" + ], + "description": "Deletes a connector resource and its child resources, which are the associated connection resources. All the child resources have to be deleted before deleting the connector resource.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ConnectorNameParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "202": { + "description": "Accepted", + "headers": { + "Azure-AsyncOperation": { + "description": "URL to query for status of the operation.", + "type": "string" + }, + "Location": { + "description": "URL to query for status of the operation.", + "type": "string" + } + } + }, + "204": { + "description": "NoContent" + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/connectors": { + "get": { + "tags": [ + "Connectors" + ], + "operationId": "Connectors_ListByResourceGroup", + "x-ms-examples": { + "List all connector resources in a resource group.": { + "$ref": "./examples/connectors/ListByResourceGroup.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "description": "Gets all connector resources in a Resource Group.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The list of all connector resources.", + "schema": { + "$ref": "#/definitions/ConnectorList" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Workloads/connectors": { + "get": { + "tags": [ + "Connectors" + ], + "operationId": "Connectors_ListBySubscription", + "x-ms-examples": { + "List all connector resources in a subscription.": { + "$ref": "./examples/connectors/ListBySubscription.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "description": "Gets all connector resources in a Subscription.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The list of all connector resources in the Subscription.", + "schema": { + "$ref": "#/definitions/ConnectorList" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/connectors/{connectorName}/acssBackups/{backupName}": { + "get": { + "tags": [ + "ACSSBackupConnection" + ], + "operationId": "ACSSBackupConnections_Get", + "x-ms-examples": { + "Get the backup connection resource of virtual instance for SAP.": { + "$ref": "./examples/ACSSBackup/Get.json" + } + }, + "description": "Gets the backup connection resource of virtual instance for SAP.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ConnectorNameParameter" + }, + { + "$ref": "#/parameters/BackupNameParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Describes the backup connection resource.", + "schema": { + "$ref": "#/definitions/ACSSBackupConnection" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + } + }, + "put": { + "tags": [ + "ACSSBackupConnection" + ], + "operationId": "ACSSBackupConnections_Create", + "x-ms-examples": { + "Create a vm backup connection with a new backup policy.": { + "$ref": "./examples/ACSSBackup/VM_New_Create.json" + }, + "Create a vm backup connection with an existing backup policy.": { + "$ref": "./examples/ACSSBackup/VM_Existing_Create.json" + }, + "Create a db backup connection with a new backup policy.": { + "$ref": "./examples/ACSSBackup/DB_New_Create.json" + }, + "Create a db backup connection with an existing backup policy.": { + "$ref": "./examples/ACSSBackup/DB_Existing_Create.json" + }, + "Create a HANA backup connection with a new backup policy.": { + "$ref": "./examples/ACSSBackup/HANA_NewPolicy.json" + }, + "Create a SQL backup connection with a new backup policy.": { + "$ref": "./examples/ACSSBackup/SQL_NewPolicy.json" + }, + "Create a VM backup connection with a new backup policy with tieringPolicy.": { + "$ref": "./examples/ACSSBackup/VM_NewPolicy.json" + } + }, + "x-ms-long-running-operation": true, + "produces": [ + "application/json" + ], + "description": "Creates the backup connection resource of virtual instance for SAP.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ConnectorNameParameter" + }, + { + "$ref": "#/parameters/BackupNameParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "in": "body", + "name": "body", + "description": "The request body of backup connection of virtual instance for SAP.", + "schema": { + "$ref": "#/definitions/ACSSBackupConnection" + } + } + ], + "responses": { + "201": { + "description": "Describes the backup connection resource of virtual instance for SAP.", + "schema": { + "$ref": "#/definitions/ACSSBackupConnection" + } + }, + "200": { + "description": "Describes the backup connection resource of virtual instance for SAP.", + "schema": { + "$ref": "#/definitions/ACSSBackupConnection" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + } + }, + "patch": { + "tags": [ + "ACSSBackupConnection" + ], + "operationId": "ACSSBackupConnections_Update", + "x-ms-examples": { + "Update an backup connection resource of virtual instance for SAP.": { + "$ref": "./examples/ACSSBackup/Update.json" + } + }, + "x-ms-long-running-operation": true, + "produces": [ + "application/json" + ], + "description": "Updates the backup connection resource of virtual instance for SAP.

This can be used to update tags on the resource.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ConnectorNameParameter" + }, + { + "$ref": "#/parameters/BackupNameParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "in": "body", + "name": "body", + "description": "The request body of backup connection resource of virtual instance for SAP.", + "schema": { + "$ref": "#/definitions/UpdateACSSBackupConnectionRequest" + } + } + ], + "responses": { + "202": { + "description": "Describes the backup connection resource created which is being updated.", + "headers": { + "Location": { + "type": "string" + } + } + }, + "200": { + "description": "Describes the backup connection resource of virtual instance for SAP.", + "schema": { + "$ref": "#/definitions/ACSSBackupConnection" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + } + }, + "delete": { + "tags": [ + "ACSSBackupConnection" + ], + "operationId": "ACSSBackupConnections_Delete", + "x-ms-examples": { + "Delete a backup connection resource of virtual instance for SAP.": { + "$ref": "./examples/ACSSBackup/Delete.json" + } + }, + "x-ms-long-running-operation": true, + "produces": [ + "application/json" + ], + "description": "Deletes the backup connection resource of virtual instance for SAP.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ConnectorNameParameter" + }, + { + "$ref": "#/parameters/BackupNameParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "202": { + "description": "Accepted", + "headers": { + "Azure-AsyncOperation": { + "description": "URL to query for status of the operation.", + "type": "string" + }, + "Location": { + "description": "URL to query for status of the operation.", + "type": "string" + } + } + }, + "204": { + "description": "NoContent" + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/connectors/{connectorName}/acssBackups": { + "get": { + "tags": [ + "ACSSBackupConnections" + ], + "operationId": "ACSSBackupConnections_List", + "x-ms-examples": { + "List the backup connection resources of virtual instance for SAP under the given connector resource.": { + "$ref": "./examples/ACSSBackup/List.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "description": "Lists the backup connection resources of virtual instance for SAP under the given connector resource.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ConnectorNameParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Describes the backup connection resource of virtual instance for SAP.", + "schema": { + "$ref": "#/definitions/ACSSBackupConnectionList" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + } + } + } + }, + "definitions": { + "ConnectorProvisioningState": { + "description": "Defines the provisioning states.", + "enum": [ + "Succeeded", + "Updating", + "Creating", + "Failed", + "Deleting", + "Canceled" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "ConnectorProvisioningState", + "modelAsString": true + } + }, + "UpdateConnectorRequest": { + "description": "Defines the request body for updating a connector.", + "type": "object", + "properties": { + "tags": { + "description": "Gets or sets the resource tags.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "identity": { + "$ref": "../../../common-types/v1/commonTypes.json#/definitions/UserAssignedServiceIdentity" + } + } + }, + "UpdateACSSBackupConnectionRequest": { + "description": "Defines the request body for updating backup connection resource of virtual instance for SAP.", + "type": "object", + "properties": { + "tags": { + "description": "Gets or sets the Resource tags.", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "ConnectorProperties": { + "description": "Defines the connector resource properties.", + "type": "object", + "required": [ + "sourceResourceId" + ], + "properties": { + "sourceResourceId": { + "description": "Defines the ID of the connector's source resource.", + "type": "string", + "x-ms-mutability": [ + "create", + "read" + ] + }, + "provisioningState": { + "$ref": "#/definitions/ConnectorProvisioningState", + "readOnly": true + }, + "errors": { + "description": "Indicates any errors on the connector resource.", + "$ref": "#/definitions/ConnectorErrorDefinition", + "readOnly": true + }, + "managedResourceGroupConfiguration": { + "description": "Managed resource group configuration", + "$ref": "#/definitions/ManagedRGConfiguration" + } + } + }, + "Connector": { + "description": "Define the connector resource.", + "type": "object", + "allOf": [ + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/TrackedResource" + } + ], + "properties": { + "identity": { + "$ref": "../../../common-types/v1/commonTypes.json#/definitions/UserAssignedServiceIdentity" + }, + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/ConnectorProperties" + } + }, + "required": [ + "properties" + ] + }, + "ConnectorList": { + "description": "Defines the collection of connector resources.", + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "description": "Gets the list of connector resources.", + "type": "array", + "items": { + "$ref": "#/definitions/Connector" + } + }, + "nextLink": { + "description": "Gets the value of next link.", + "type": "string", + "format": "uri" + } + } + }, + "ACSSBackupConnectionList": { + "description": "Defines the collection of backup connection resources of virtual instances for SAP.", + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "description": "Gets the list of backup connection resources of virtual instances for SAP.", + "type": "array", + "items": { + "$ref": "#/definitions/ACSSBackupConnection" + } + }, + "nextLink": { + "description": "Gets the value of next link.", + "type": "string", + "format": "uri" + } + } + }, + "NewRecoveryServicesVault": { + "x-ms-discriminator-value": "New", + "description": "New recovery services vault.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/RecoveryServicesVaultProperties" + } + ], + "required": [ + "name", + "resourceGroup" + ], + "properties": { + "name": { + "type": "string", + "description": "The name of the recovery services vault has to be created." + }, + "resourceGroup": { + "type": "string", + "description": "The name of the resource group where the recovery services vault has to be created." + } + } + }, + "ExistingRecoveryServicesVault": { + "x-ms-discriminator-value": "Existing", + "description": "Existing recovery services vault.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/RecoveryServicesVaultProperties" + } + ], + "required": [ + "id" + ], + "properties": { + "id": { + "type": "string", + "description": "The resource ID of the recovery services vault that has been created." + } + } + }, + "RecoveryServicesVaultProperties": { + "description": "The properties of the recovery services vault used for backup.", + "type": "object", + "required": [ + "vaultType" + ], + "properties": { + "vaultType": { + "description": "The vault type, whether it is existing or has to be created.", + "type": "string", + "enum": [ + "Existing", + "New" + ], + "x-ms-enum": { + "name": "vaultType", + "modelAsString": true + } + } + }, + "discriminator": "vaultType" + }, + "VMBackupPolicyProperties": { + "description": "Defines the policy properties for virtual machine backup.", + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string", + "description": "The name of the VM Backup policy." + }, + "properties": { + "x-ms-client-flatten": true, + "$ref": "./backupTypes.json#/definitions/AzureIaaSVMProtectionPolicy" + } + } + }, + "DiskExclusionProperties": { + "description": "Defines the disk exclusion properties for virtual machine backup.", + "type": "object", + "required": [ + "diskLunList", + "isInclusionList" + ], + "properties": { + "diskLunList": { + "description": "List of Disks' Logical Unit Numbers (LUN) to be used for VM Protection.", + "type": "array", + "items": { + "format": "int32", + "type": "integer" + } + }, + "isInclusionList": { + "description": "Flag to indicate whether DiskLunList is to be included/ excluded from backup.", + "type": "boolean" + } + } + }, + "VMBackupData": { + "description": "Defines the VM Backup data for a virtual instance for SAP.", + "x-ms-discriminator-value": "VM", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/BackupData" + } + ], + "properties": { + "backupPolicy": { + "$ref": "#/definitions/VMBackupPolicyProperties" + }, + "diskExclusionProperties": { + "$ref": "#/definitions/DiskExclusionProperties" + } + }, + "required": [ + "backupPolicy" + ] + }, + "DBBackupPolicyProperties": { + "description": "Defines the policy properties for database backup.", + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string", + "description": "The name of the DB backup policy." + }, + "properties": { + "x-ms-client-flatten": true, + "$ref": "./backupTypes.json#/definitions/AzureVmWorkloadProtectionPolicy" + } + } + }, + "SSLConfiguration": { + "description": "Specify the HANA database TLS/SSL properties which will be used for enabling Azure Backup for this database. You need to specify these details if you have enabled secure communication for your HANA database.", + "type": "object", + "properties": { + "sslKeyStore": { + "type": "string", + "description": "Specify the name of the keystore file that contains the client's identity (eg. sapsrv.pse). The script will search for the file in the appropriate directory depending on the crypto provider mentioned. If this argument is not provided, it is automatically determined by searching in the configuration files." + }, + "sslTrustStore": { + "type": "string", + "description": "Specify the name of the trust store file that contains the server’s public certificates (eg. sapsrv.pse). The script will search for the file in the appropriate directory depending on the crypto provider mentioned. If this argument is not provided, it is automatically determined by searching in the configuration files." + }, + "sslHostNameInCertificate": { + "type": "string", + "description": "Specify the hostname as mentioned in the SSL certificate. If this argument is not provided, it is automatically determined by searching in the SSL certificate." + }, + "sslCryptoProvider": { + "type": "string", + "description": "Specify the crypto provider being used (commoncrypto/openssl). If this argument is not provided, it is automatically determined by searching in the configuration files.", + "enum": [ + "commoncrypto", + "openssl" + ], + "x-ms-enum": { + "name": "sslCryptoProvider", + "modelAsString": true + } + } + } + }, + "HanaBackupData": { + "description": "Defines the HANA Backup data for a virtual instance for SAP.", + "x-ms-discriminator-value": "HANA", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/BackupData" + } + ], + "required": [ + "backupPolicy", + "hdbuserstoreKeyName" + ], + "properties": { + "sslConfiguration": { + "type": "object", + "$ref": "#/definitions/SSLConfiguration", + "description": "Path of the SSL key store." + }, + "backupPolicy": { + "$ref": "#/definitions/DBBackupPolicyProperties" + }, + "hdbuserstoreKeyName": { + "type": "string", + "description": "Name of the HANA Database User Store Key." + }, + "instanceNumber": { + "description": "Gets or sets the database instance number.", + "type": "string" + }, + "dbInstanceSnapshotBackupPolicy": { + "$ref": "#/definitions/DBBackupPolicyProperties" + } + } + }, + "SqlBackupData": { + "description": "Defines the SQL Backup data for a virtual instance for SAP.", + "x-ms-discriminator-value": "SQL", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/BackupData" + } + ], + "required": [ + "backupPolicy" + ], + "properties": { + "backupPolicy": { + "$ref": "#/definitions/DBBackupPolicyProperties" + } + } + }, + "ACSSBackupConnectionProperties": { + "description": "Defines the backup connection properties for a virtual instance for SAP.", + "type": "object", + "properties": { + "backupData": { + "$ref": "#/definitions/BackupData" + }, + "provisioningState": { + "$ref": "#/definitions/ConnectorProvisioningState", + "readOnly": true + }, + "errors": { + "description": "Defines the errors related to backup connection resource of virtual instance for SAP.", + "readOnly": true, + "$ref": "#/definitions/ConnectorErrorDefinition" + } + } + }, + "BackupData": { + "description": "Information about the recovery services vault and backup policy used for backup.", + "type": "object", + "required": [ + "backupType", + "recoveryServicesVault" + ], + "properties": { + "backupType": { + "$ref": "#/definitions/BackupType" + }, + "recoveryServicesVault": { + "$ref": "#/definitions/RecoveryServicesVaultProperties" + } + }, + "discriminator": "backupType" + }, + "BackupType": { + "description": "The type of backup, VM, SQL or HANA.", + "type": "string", + "enum": [ + "VM", + "SQL", + "HANA" + ], + "x-ms-mutability": [ + "create", + "read" + ], + "x-ms-enum": { + "name": "backupType", + "modelAsString": true + } + }, + "ACSSBackupConnection": { + "description": "Define the backup connection resource of virtual instance for SAP..", + "type": "object", + "allOf": [ + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/TrackedResource" + } + ], + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/ACSSBackupConnectionProperties" + } + } + }, + "ConnectorErrorDefinition": { + "type": "object", + "description": "Error definition.", + "properties": { + "code": { + "description": "Service specific error code which serves as the substatus for the HTTP error code.", + "type": "string", + "readOnly": true + }, + "message": { + "description": "Description of the error.", + "type": "string", + "readOnly": true + }, + "details": { + "description": "Internal error details.", + "type": "array", + "items": { + "$ref": "#/definitions/ConnectorErrorDefinition" + }, + "x-ms-identifiers": [], + "readOnly": true + } + } + }, + "ManagedRGConfiguration": { + "description": "Managed resource group configuration", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Managed resource group name" + } + } + } + }, + "parameters": { + "ConnectorNameParameter": { + "name": "connectorName", + "in": "path", + "required": true, + "pattern": "^[A-Za-z0-9]+-?[A-Za-z0-9]*$", + "type": "string", + "description": "The name of the connector resource", + "x-ms-parameter-location": "method" + }, + "BackupNameParameter": { + "name": "backupName", + "in": "path", + "required": true, + "pattern": "^.+", + "type": "string", + "description": "The name of the backup connection resource of virtual instance for SAP.", + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/workloads/resource-manager/Microsoft.Workloads/connectors/preview/2023-10-01-preview/examples/ACSSBackup/DB_Existing_Create.json b/specification/workloads/resource-manager/Microsoft.Workloads/connectors/preview/2023-10-01-preview/examples/ACSSBackup/DB_Existing_Create.json new file mode 100644 index 000000000000..4508f2d6dc79 --- /dev/null +++ b/specification/workloads/resource-manager/Microsoft.Workloads/connectors/preview/2023-10-01-preview/examples/ACSSBackup/DB_Existing_Create.json @@ -0,0 +1,87 @@ +{ + "parameters": { + "subscriptionId": "8e17e36c-42e9-4cd5-a078-7b44883414e0", + "resourceGroupName": "test-rg", + "connectorName": "C1", + "backupName": "dbBackup", + "api-version": "2023-10-01-preview", + "body": { + "tags": {}, + "location": "westcentralus", + "properties": { + "backupData": { + "backupType": "SQL", + "recoveryServicesVault": { + "id": "/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.RecoveryServices/vaults/test-vault", + "vaultType": "Existing" + }, + "backupPolicy": { + "name": "defaultDbPolicy" + } + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/connectors/C1/acssBackups/dbBackup", + "name": "db1", + "type": "Microsoft.Workloads/connectors/acssBackups", + "tags": {}, + "location": "westcentralus", + "systemData": { + "createdBy": "user@xyz.com", + "createdByType": "User", + "createdAt": "2021-08-19T15:10:46.196Z", + "lastModifiedBy": "user@xyz.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-08-19T15:10:46.196Z" + }, + "properties": { + "backupData": { + "backupType": "SQL", + "recoveryServicesVault": { + "id": "/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.RecoveryServices/vaults/test-vault", + "vaultType": "Existing" + }, + "backupPolicy": { + "name": "defaultDbPolicy" + } + }, + "provisioningState": "Succeeded" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/connectors/C1/acssBackups/dbBackup", + "name": "db1", + "type": "Microsoft.Workloads/connectors/acssBackups", + "tags": {}, + "location": "westcentralus", + "systemData": { + "createdBy": "user@xyz.com", + "createdByType": "User", + "createdAt": "2021-08-19T15:10:46.196Z", + "lastModifiedBy": "user@xyz.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-08-19T15:10:46.196Z" + }, + "properties": { + "backupData": { + "backupType": "SQL", + "recoveryServicesVault": { + "id": "/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.RecoveryServices/vaults/test-vault", + "vaultType": "Existing" + }, + "backupPolicy": { + "name": "defaultDbPolicy" + } + }, + "provisioningState": "Creating" + } + } + } + } +} diff --git a/specification/workloads/resource-manager/Microsoft.Workloads/connectors/preview/2023-10-01-preview/examples/ACSSBackup/DB_New_Create.json b/specification/workloads/resource-manager/Microsoft.Workloads/connectors/preview/2023-10-01-preview/examples/ACSSBackup/DB_New_Create.json new file mode 100644 index 000000000000..65d3ce8c2743 --- /dev/null +++ b/specification/workloads/resource-manager/Microsoft.Workloads/connectors/preview/2023-10-01-preview/examples/ACSSBackup/DB_New_Create.json @@ -0,0 +1,234 @@ +{ + "parameters": { + "subscriptionId": "8e17e36c-42e9-4cd5-a078-7b44883414e0", + "resourceGroupName": "test-rg", + "connectorName": "C1", + "backupName": "dbBackup", + "api-version": "2023-10-01-preview", + "body": { + "tags": {}, + "location": "westcentralus", + "properties": { + "backupData": { + "backupType": "SQL", + "recoveryServicesVault": { + "id": "/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.RecoveryServices/vaults/test-vault", + "vaultType": "Existing" + }, + "backupPolicy": { + "name": "defaultDbPolicy", + "properties": { + "backupManagementType": "AzureWorkload", + "workLoadType": "SQLDataBase", + "settings": { + "timeZone": "UTC", + "issqlcompression": false, + "isCompression": false + }, + "subProtectionPolicy": [ + { + "policyType": "Full", + "schedulePolicy": { + "schedulePolicyType": "SimpleSchedulePolicy", + "scheduleRunFrequency": "Daily", + "scheduleRunTimes": [ + "2018-01-10T18:30:00Z" + ], + "scheduleWeeklyFrequency": 0 + }, + "retentionPolicy": { + "retentionPolicyType": "LongTermRetentionPolicy", + "dailySchedule": { + "retentionTimes": [ + "2018-01-10T18:30:00Z" + ], + "retentionDuration": { + "count": 30, + "durationType": "Days" + } + } + } + }, + { + "policyType": "Log", + "schedulePolicy": { + "schedulePolicyType": "LogSchedulePolicy", + "scheduleFrequencyInMins": 60 + }, + "retentionPolicy": { + "retentionPolicyType": "SimpleRetentionPolicy", + "retentionDuration": { + "count": 30, + "durationType": "Days" + } + } + } + ], + "protectedItemsCount": 0 + } + } + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/connectors/C1/acssBackups/dbBackup", + "name": "db1", + "type": "Microsoft.Workloads/connectors/acssBackups", + "tags": {}, + "location": "westcentralus", + "systemData": { + "createdBy": "user@xyz.com", + "createdByType": "User", + "createdAt": "2021-08-19T15:10:46.196Z", + "lastModifiedBy": "user@xyz.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-08-19T15:10:46.196Z" + }, + "properties": { + "backupData": { + "backupType": "SQL", + "recoveryServicesVault": { + "id": "/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.RecoveryServices/vaults/test-vault", + "vaultType": "Existing" + }, + "backupPolicy": { + "name": "defaultDbPolicy", + "properties": { + "backupManagementType": "AzureWorkload", + "workLoadType": "SQLDataBase", + "settings": { + "timeZone": "UTC", + "issqlcompression": false, + "isCompression": false + }, + "subProtectionPolicy": [ + { + "policyType": "Full", + "schedulePolicy": { + "schedulePolicyType": "SimpleSchedulePolicy", + "scheduleRunFrequency": "Daily", + "scheduleRunTimes": [ + "2018-01-10T18:30:00Z" + ], + "scheduleWeeklyFrequency": 0 + }, + "retentionPolicy": { + "retentionPolicyType": "LongTermRetentionPolicy", + "dailySchedule": { + "retentionTimes": [ + "2018-01-10T18:30:00Z" + ], + "retentionDuration": { + "count": 30, + "durationType": "Days" + } + } + } + }, + { + "policyType": "Log", + "schedulePolicy": { + "schedulePolicyType": "LogSchedulePolicy", + "scheduleFrequencyInMins": 60 + }, + "retentionPolicy": { + "retentionPolicyType": "SimpleRetentionPolicy", + "retentionDuration": { + "count": 30, + "durationType": "Days" + } + } + } + ], + "protectedItemsCount": 0 + } + } + }, + "provisioningState": "Succeeded" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/connectors/C1/acssBackups/dbBackup", + "name": "db1", + "type": "Microsoft.Workloads/connectors/acssBackups", + "tags": {}, + "location": "westcentralus", + "systemData": { + "createdBy": "user@xyz.com", + "createdByType": "User", + "createdAt": "2021-08-19T15:10:46.196Z", + "lastModifiedBy": "user@xyz.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-08-19T15:10:46.196Z" + }, + "properties": { + "backupData": { + "backupType": "SQL", + "recoveryServicesVault": { + "id": "/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.RecoveryServices/vaults/test-vault", + "vaultType": "Existing" + }, + "backupPolicy": { + "name": "defaultDbPolicy", + "properties": { + "backupManagementType": "AzureWorkload", + "workLoadType": "SQLDataBase", + "settings": { + "timeZone": "UTC", + "issqlcompression": false, + "isCompression": false + }, + "subProtectionPolicy": [ + { + "policyType": "Full", + "schedulePolicy": { + "schedulePolicyType": "SimpleSchedulePolicy", + "scheduleRunFrequency": "Daily", + "scheduleRunTimes": [ + "2018-01-10T18:30:00Z" + ], + "scheduleWeeklyFrequency": 0 + }, + "retentionPolicy": { + "retentionPolicyType": "LongTermRetentionPolicy", + "dailySchedule": { + "retentionTimes": [ + "2018-01-10T18:30:00Z" + ], + "retentionDuration": { + "count": 30, + "durationType": "Days" + } + } + } + }, + { + "policyType": "Log", + "schedulePolicy": { + "schedulePolicyType": "LogSchedulePolicy", + "scheduleFrequencyInMins": 60 + }, + "retentionPolicy": { + "retentionPolicyType": "SimpleRetentionPolicy", + "retentionDuration": { + "count": 30, + "durationType": "Days" + } + } + } + ], + "protectedItemsCount": 0 + } + } + }, + "provisioningState": "Creating" + } + } + } + } +} diff --git a/specification/workloads/resource-manager/Microsoft.Workloads/connectors/preview/2023-10-01-preview/examples/ACSSBackup/Delete.json b/specification/workloads/resource-manager/Microsoft.Workloads/connectors/preview/2023-10-01-preview/examples/ACSSBackup/Delete.json new file mode 100644 index 000000000000..80acec9a89a6 --- /dev/null +++ b/specification/workloads/resource-manager/Microsoft.Workloads/connectors/preview/2023-10-01-preview/examples/ACSSBackup/Delete.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "subscriptionId": "6d875e77-e412-4d7d-9af4-8895278b4443", + "resourceGroupName": "test-rg", + "connectorName": "C1", + "backupName": "vmBackup", + "api-version": "2023-10-01-preview" + }, + "responses": { + "202": { + "headers": { + "Location": "https://management.azure.com/providers/Microsoft.Workloads/operationResults/{operationId}", + "Azure-AsyncOperation": "https://management.azure.com/providers/Microsoft.Workloads/operationStatuses/{operationId}" + } + }, + "204": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/providers/Microsoft.Workloads/operationStatuses/{operationId}" + } + } + } +} diff --git a/specification/workloads/resource-manager/Microsoft.Workloads/connectors/preview/2023-10-01-preview/examples/ACSSBackup/Get.json b/specification/workloads/resource-manager/Microsoft.Workloads/connectors/preview/2023-10-01-preview/examples/ACSSBackup/Get.json new file mode 100644 index 000000000000..2c88cf07f228 --- /dev/null +++ b/specification/workloads/resource-manager/Microsoft.Workloads/connectors/preview/2023-10-01-preview/examples/ACSSBackup/Get.json @@ -0,0 +1,48 @@ +{ + "parameters": { + "subscriptionId": "8e17e36c-42e9-4cd5-a078-7b44883414e0", + "resourceGroupName": "test-rg", + "connectorName": "C1", + "backupName": "vmBackup", + "api-version": "2023-10-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/connectors/C1/acssBackups/vmBackup", + "name": "vmBackup", + "type": "Microsoft.Workloads/connectors/acssBackups", + "tags": {}, + "location": "westcentralus", + "systemData": { + "createdBy": "user@xyz.com", + "createdByType": "User", + "createdAt": "2021-08-19T15:10:46.196Z", + "lastModifiedBy": "user@xyz.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-08-19T15:10:46.196Z" + }, + "properties": { + "backupData": { + "backupType": "VM", + "recoveryServicesVault": { + "id": "/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.RecoveryServices/vaults/test-vault", + "vaultType": "Existing" + }, + "backupPolicy": { + "name": "defaultVmPolicy" + }, + "diskExclusionProperties": { + "diskLunList": [ + 0, + 1 + ], + "isInclusionList": true + } + }, + "provisioningState": "Succeeded" + } + } + } + } +} diff --git a/specification/workloads/resource-manager/Microsoft.Workloads/connectors/preview/2023-10-01-preview/examples/ACSSBackup/HANA_NewPolicy.json b/specification/workloads/resource-manager/Microsoft.Workloads/connectors/preview/2023-10-01-preview/examples/ACSSBackup/HANA_NewPolicy.json new file mode 100644 index 000000000000..e304beecc750 --- /dev/null +++ b/specification/workloads/resource-manager/Microsoft.Workloads/connectors/preview/2023-10-01-preview/examples/ACSSBackup/HANA_NewPolicy.json @@ -0,0 +1,589 @@ +{ + "parameters": { + "subscriptionId": "8e17e36c-42e9-4cd5-a078-7b44883414e0", + "resourceGroupName": "test-rg", + "connectorName": "C1", + "backupName": "dbBackup", + "api-version": "2023-10-01-preview", + "body": { + "tags": {}, + "location": "westcentralus", + "properties": { + "backupData": { + "backupType": "HANA", + "recoveryServicesVault": { + "name": "test-vault", + "resourceGroup": "test-rg", + "vaultType": "New" + }, + "hdbuserstoreKeyName": "abcd", + "instanceNumber": "00", + "sslConfiguration": { + "sslKeyStore": "sapsrv.pse", + "sslTrustStore": "sapsrv.pse", + "sslHostNameInCertificate": "hostname", + "sslCryptoProvider": "commoncrypto" + }, + "backupPolicy": { + "name": "defaultHanaPolicy", + "properties": { + "backupManagementType": "AzureWorkload", + "workLoadType": "SAPHanaDatabase", + "settings": { + "timeZone": "UTC", + "issqlcompression": false, + "isCompression": false + }, + "subProtectionPolicy": [ + { + "policyType": "Full", + "schedulePolicy": { + "schedulePolicyType": "SimpleSchedulePolicy", + "scheduleRunFrequency": "Weekly", + "scheduleRunDays": [ + "Sunday" + ], + "scheduleRunTimes": [ + "2022-11-29T19:30:00.000Z" + ] + }, + "retentionPolicy": { + "retentionPolicyType": "LongTermRetentionPolicy", + "dailySchedule": null, + "weeklySchedule": { + "daysOfTheWeek": [ + "Sunday" + ], + "retentionTimes": [ + "2022-11-29T19:30:00.000Z" + ], + "retentionDuration": { + "count": 104, + "durationType": "Weeks" + } + }, + "monthlySchedule": { + "retentionScheduleFormatType": "Weekly", + "retentionScheduleDaily": null, + "retentionScheduleWeekly": { + "daysOfTheWeek": [ + "Sunday" + ], + "weeksOfTheMonth": [ + "First" + ] + }, + "retentionTimes": [ + "2022-11-29T19:30:00.000Z" + ], + "retentionDuration": { + "count": 60, + "durationType": "Months" + } + }, + "yearlySchedule": { + "retentionScheduleFormatType": "Weekly", + "monthsOfYear": [ + "January" + ], + "retentionScheduleDaily": null, + "retentionScheduleWeekly": { + "daysOfTheWeek": [ + "Sunday" + ], + "weeksOfTheMonth": [ + "First" + ] + }, + "retentionTimes": [ + "2022-11-29T19:30:00.000Z" + ], + "retentionDuration": { + "count": 10, + "durationType": "Years" + } + } + }, + "tieringPolicy": { + "ArchivedRP": { + "tieringMode": "DoNotTier" + } + } + }, + { + "policyType": "Differential", + "schedulePolicy": { + "schedulePolicyType": "SimpleSchedulePolicy", + "scheduleRunFrequency": "Weekly", + "scheduleRunDays": [ + "Monday" + ], + "scheduleRunTimes": [ + "2022-09-29T02:00:00Z" + ], + "scheduleWeeklyFrequency": 0 + }, + "retentionPolicy": { + "retentionPolicyType": "SimpleRetentionPolicy", + "retentionDuration": { + "count": 30, + "durationType": "Days" + } + } + }, + { + "policyType": "Log", + "schedulePolicy": { + "schedulePolicyType": "LogSchedulePolicy", + "scheduleFrequencyInMins": 120 + }, + "retentionPolicy": { + "retentionPolicyType": "SimpleRetentionPolicy", + "retentionDuration": { + "count": 20, + "durationType": "Days" + } + } + } + ], + "protectedItemsCount": 0 + } + }, + "dbInstanceSnapshotBackupPolicy": { + "name": "defaultDbInstanceSnapshotPolicy", + "properties": { + "backupManagementType": "AzureWorkload", + "workLoadType": "SAPHanaDBInstance", + "settings": { + "timeZone": "UTC", + "issqlcompression": false, + "isCompression": false + }, + "subProtectionPolicy": [ + { + "policyType": "SnapshotFull", + "schedulePolicy": { + "schedulePolicyType": "SimpleSchedulePolicy", + "scheduleRunFrequency": "Daily", + "scheduleRunDays": null, + "scheduleRunTimes": [ + "2023-09-18T06:30:00.000Z" + ] + }, + "snapshotBackupAdditionalDetails": { + "instantRpRetentionRangeInDays": 1, + "instantRPDetails": "test-rg", + "userAssignedManagedIdentityDetails": { + "identityArmId": "/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourcegroups/test-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testMsi", + "identityName": "testMsi", + "userAssignedIdentityProperties": { + "clientId": "c3a877cf-51f8-4031-8f17-ab562d1e7737", + "principalId": "2f5834bd-4b86-4d85-a8df-6dd829a6418c" + } + } + } + } + ] + } + } + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/connectors/C1/acssBackups/vmBackup", + "name": "db1", + "type": "Microsoft.Workloads/connectors/acssBackups", + "tags": {}, + "location": "westcentralus", + "systemData": { + "createdBy": "user@xyz.com", + "createdByType": "User", + "createdAt": "2021-08-19T15:10:46.196Z", + "lastModifiedBy": "user@xyz.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-08-19T15:10:46.196Z" + }, + "properties": { + "backupData": { + "backupType": "HANA", + "recoveryServicesVault": { + "name": "test-vault", + "resourceGroup": "test-rg", + "vaultType": "New" + }, + "hdbuserstoreKeyName": "abcd", + "sslConfiguration": { + "sslKeyStore": "sapsrv.pse", + "sslTrustStore": "sapsrv.pse", + "sslHostNameInCertificate": "hostname", + "sslCryptoProvider": "commoncrypto" + }, + "backupPolicy": { + "name": "defaultHanaPolicy", + "properties": { + "backupManagementType": "AzureWorkload", + "workLoadType": "SAPHanaDatabase", + "settings": { + "timeZone": "UTC", + "issqlcompression": false, + "isCompression": false + }, + "subProtectionPolicy": [ + { + "policyType": "Full", + "schedulePolicy": { + "schedulePolicyType": "SimpleSchedulePolicy", + "scheduleRunFrequency": "Weekly", + "scheduleRunDays": [ + "Sunday" + ], + "scheduleRunTimes": [ + "2022-11-29T19:30:00.000Z" + ] + }, + "retentionPolicy": { + "retentionPolicyType": "LongTermRetentionPolicy", + "dailySchedule": null, + "weeklySchedule": { + "daysOfTheWeek": [ + "Sunday" + ], + "retentionTimes": [ + "2022-11-29T19:30:00.000Z" + ], + "retentionDuration": { + "count": 104, + "durationType": "Weeks" + } + }, + "monthlySchedule": { + "retentionScheduleFormatType": "Weekly", + "retentionScheduleDaily": null, + "retentionScheduleWeekly": { + "daysOfTheWeek": [ + "Sunday" + ], + "weeksOfTheMonth": [ + "First" + ] + }, + "retentionTimes": [ + "2022-11-29T19:30:00.000Z" + ], + "retentionDuration": { + "count": 60, + "durationType": "Months" + } + }, + "yearlySchedule": { + "retentionScheduleFormatType": "Weekly", + "monthsOfYear": [ + "January" + ], + "retentionScheduleDaily": null, + "retentionScheduleWeekly": { + "daysOfTheWeek": [ + "Sunday" + ], + "weeksOfTheMonth": [ + "First" + ] + }, + "retentionTimes": [ + "2022-11-29T19:30:00.000Z" + ], + "retentionDuration": { + "count": 10, + "durationType": "Years" + } + } + }, + "tieringPolicy": { + "ArchivedRP": { + "tieringMode": "DoNotTier" + } + } + }, + { + "policyType": "Differential", + "schedulePolicy": { + "schedulePolicyType": "SimpleSchedulePolicy", + "scheduleRunFrequency": "Weekly", + "scheduleRunDays": [ + "Monday" + ], + "scheduleRunTimes": [ + "2022-09-29T02:00:00Z" + ], + "scheduleWeeklyFrequency": 0 + }, + "retentionPolicy": { + "retentionPolicyType": "SimpleRetentionPolicy", + "retentionDuration": { + "count": 30, + "durationType": "Days" + } + } + }, + { + "policyType": "Log", + "schedulePolicy": { + "schedulePolicyType": "LogSchedulePolicy", + "scheduleFrequencyInMins": 120 + }, + "retentionPolicy": { + "retentionPolicyType": "SimpleRetentionPolicy", + "retentionDuration": { + "count": 20, + "durationType": "Days" + } + } + } + ], + "protectedItemsCount": 0 + } + }, + "dbInstanceSnapshotBackupPolicy": { + "name": "defaultDbInstanceSnapshotPolicy", + "properties": { + "backupManagementType": "AzureWorkload", + "workLoadType": "SAPHanaDBInstance", + "settings": { + "timeZone": "UTC", + "issqlcompression": false, + "isCompression": false + }, + "subProtectionPolicy": [ + { + "policyType": "SnapshotFull", + "schedulePolicy": { + "schedulePolicyType": "SimpleSchedulePolicy", + "scheduleRunFrequency": "Daily", + "scheduleRunDays": null, + "scheduleRunTimes": [ + "2023-09-18T06:30:00.000Z" + ] + }, + "snapshotBackupAdditionalDetails": { + "instantRpRetentionRangeInDays": 1, + "instantRPDetails": "test-rg", + "userAssignedManagedIdentityDetails": { + "identityArmId": "/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourcegroups/test-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testMsi", + "identityName": "testMsi", + "userAssignedIdentityProperties": { + "clientId": "c3a877cf-51f8-4031-8f17-ab562d1e7737", + "principalId": "2f5834bd-4b86-4d85-a8df-6dd829a6418c" + } + } + } + } + ] + } + } + }, + "provisioningState": "Succeeded" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/connectors/C1/acssBackups/vmBackup", + "name": "db1", + "type": "Microsoft.Workloads/connectors/acssBackups", + "tags": {}, + "location": "westcentralus", + "systemData": { + "createdBy": "user@xyz.com", + "createdByType": "User", + "createdAt": "2021-08-19T15:10:46.196Z", + "lastModifiedBy": "user@xyz.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-08-19T15:10:46.196Z" + }, + "properties": { + "backupData": { + "backupType": "HANA", + "recoveryServicesVault": { + "name": "test-vault", + "resourceGroup": "test-rg", + "vaultType": "New" + }, + "hdbuserstoreKeyName": "abcd", + "sslConfiguration": { + "sslKeyStore": "sapsrv.pse", + "sslTrustStore": "sapsrv.pse", + "sslHostNameInCertificate": "hostname", + "sslCryptoProvider": "commoncrypto" + }, + "backupPolicy": { + "name": "defaultHanaPolicy", + "properties": { + "backupManagementType": "AzureWorkload", + "workLoadType": "SAPHanaDatabase", + "settings": { + "timeZone": "UTC", + "issqlcompression": false, + "isCompression": false + }, + "subProtectionPolicy": [ + { + "policyType": "Full", + "schedulePolicy": { + "schedulePolicyType": "SimpleSchedulePolicy", + "scheduleRunFrequency": "Weekly", + "scheduleRunDays": [ + "Sunday" + ], + "scheduleRunTimes": [ + "2022-11-29T19:30:00.000Z" + ] + }, + "retentionPolicy": { + "retentionPolicyType": "LongTermRetentionPolicy", + "dailySchedule": null, + "weeklySchedule": { + "daysOfTheWeek": [ + "Sunday" + ], + "retentionTimes": [ + "2022-11-29T19:30:00.000Z" + ], + "retentionDuration": { + "count": 104, + "durationType": "Weeks" + } + }, + "monthlySchedule": { + "retentionScheduleFormatType": "Weekly", + "retentionScheduleDaily": null, + "retentionScheduleWeekly": { + "daysOfTheWeek": [ + "Sunday" + ], + "weeksOfTheMonth": [ + "First" + ] + }, + "retentionTimes": [ + "2022-11-29T19:30:00.000Z" + ], + "retentionDuration": { + "count": 60, + "durationType": "Months" + } + }, + "yearlySchedule": { + "retentionScheduleFormatType": "Weekly", + "monthsOfYear": [ + "January" + ], + "retentionScheduleDaily": null, + "retentionScheduleWeekly": { + "daysOfTheWeek": [ + "Sunday" + ], + "weeksOfTheMonth": [ + "First" + ] + }, + "retentionTimes": [ + "2022-11-29T19:30:00.000Z" + ], + "retentionDuration": { + "count": 10, + "durationType": "Years" + } + } + }, + "tieringPolicy": { + "ArchivedRP": { + "tieringMode": "DoNotTier" + } + } + }, + { + "policyType": "Differential", + "schedulePolicy": { + "schedulePolicyType": "SimpleSchedulePolicy", + "scheduleRunFrequency": "Weekly", + "scheduleRunDays": [ + "Monday" + ], + "scheduleRunTimes": [ + "2022-09-29T02:00:00Z" + ], + "scheduleWeeklyFrequency": 0 + }, + "retentionPolicy": { + "retentionPolicyType": "SimpleRetentionPolicy", + "retentionDuration": { + "count": 30, + "durationType": "Days" + } + } + }, + { + "policyType": "Log", + "schedulePolicy": { + "schedulePolicyType": "LogSchedulePolicy", + "scheduleFrequencyInMins": 120 + }, + "retentionPolicy": { + "retentionPolicyType": "SimpleRetentionPolicy", + "retentionDuration": { + "count": 20, + "durationType": "Days" + } + } + } + ], + "protectedItemsCount": 0 + } + }, + "dbInstanceSnapshotBackupPolicy": { + "name": "defaultDbInstanceSnapshotPolicy", + "properties": { + "backupManagementType": "AzureWorkload", + "workLoadType": "SAPHanaDBInstance", + "settings": { + "timeZone": "UTC", + "issqlcompression": false, + "isCompression": false + }, + "subProtectionPolicy": [ + { + "policyType": "SnapshotFull", + "schedulePolicy": { + "schedulePolicyType": "SimpleSchedulePolicy", + "scheduleRunFrequency": "Daily", + "scheduleRunDays": null, + "scheduleRunTimes": [ + "2023-09-18T06:30:00.000Z" + ] + }, + "snapshotBackupAdditionalDetails": { + "instantRpRetentionRangeInDays": 1, + "instantRPDetails": "test-rg", + "userAssignedManagedIdentityDetails": { + "identityArmId": "/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourcegroups/test-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testMsi", + "identityName": "testMsi", + "userAssignedIdentityProperties": { + "clientId": "c3a877cf-51f8-4031-8f17-ab562d1e7737", + "principalId": "2f5834bd-4b86-4d85-a8df-6dd829a6418c" + } + } + } + } + ] + } + } + }, + "provisioningState": "Creating" + } + } + } + } +} diff --git a/specification/workloads/resource-manager/Microsoft.Workloads/connectors/preview/2023-10-01-preview/examples/ACSSBackup/List.json b/specification/workloads/resource-manager/Microsoft.Workloads/connectors/preview/2023-10-01-preview/examples/ACSSBackup/List.json new file mode 100644 index 000000000000..19a8e88777ac --- /dev/null +++ b/specification/workloads/resource-manager/Microsoft.Workloads/connectors/preview/2023-10-01-preview/examples/ACSSBackup/List.json @@ -0,0 +1,83 @@ +{ + "parameters": { + "subscriptionId": "6d875e77-e412-4d7d-9af4-8895278b4443", + "resourceGroupName": "test-rg", + "connectorName": "C1", + "api-version": "2023-10-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/connectors/C1/acssBackups/db1", + "name": "db1", + "type": "Microsoft.Workloads/connectors/acssBackups", + "tags": {}, + "location": "westcentralus", + "systemData": { + "createdBy": "user@xyz.com", + "createdByType": "User", + "createdAt": "2021-08-19T15:10:46.196Z", + "lastModifiedBy": "user@xyz.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-08-19T15:10:46.196Z" + }, + "properties": { + "backupData": { + "backupType": "SQL", + "recoveryServicesVault": { + "id": "/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.RecoveryServices/vaults/test-vault", + "vaultType": "Existing" + }, + "backupPolicy": { + "name": "defaultVmPolicy" + } + }, + "provisioningState": "Succeeded" + } + }, + { + "id": "/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/connectors/C1/acssBackups/db2", + "name": "db2", + "type": "Microsoft.Workloads/connectors/acssBackups", + "tags": {}, + "location": "westcentralus", + "systemData": { + "createdBy": "user@xyz.com", + "createdByType": "User", + "createdAt": "2021-08-19T15:10:46.196Z", + "lastModifiedBy": "user@xyz.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-08-19T15:10:46.196Z" + }, + "properties": { + "backupData": { + "backupType": "HANA", + "sslConfiguration": { + "sslKeyStore": "/hana/shared/CPH/HDB00/gglcpbhdbi1/sec/sapcli.pse", + "sslTrustStore": "/hana/shared/CPH/HDB00/gglcpbhdbi1/sec/sapsrv.pse", + "sslHostNameInCertificate": "hana-bw-azure.ubs.net", + "sslCryptoProvider": "commoncrypto" + }, + "recoveryServicesVault": { + "id": "/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.RecoveryServices/vaults/test-vault", + "vaultType": "Existing" + }, + "backupPolicy": { + "name": "defaultDbPolicy" + }, + "hdbuserstoreKeyName": "77asdf77asd", + "instanceNumber": "00", + "dbInstanceSnapshotBackupPolicy": { + "name": "defaultDbInstanceSnapshotPolicy" + } + }, + "provisioningState": "Succeeded" + } + } + ] + } + } + } +} diff --git a/specification/workloads/resource-manager/Microsoft.Workloads/connectors/preview/2023-10-01-preview/examples/ACSSBackup/SQL_NewPolicy.json b/specification/workloads/resource-manager/Microsoft.Workloads/connectors/preview/2023-10-01-preview/examples/ACSSBackup/SQL_NewPolicy.json new file mode 100644 index 000000000000..9ce1a2fe3004 --- /dev/null +++ b/specification/workloads/resource-manager/Microsoft.Workloads/connectors/preview/2023-10-01-preview/examples/ACSSBackup/SQL_NewPolicy.json @@ -0,0 +1,462 @@ +{ + "parameters": { + "subscriptionId": "8e17e36c-42e9-4cd5-a078-7b44883414e0", + "resourceGroupName": "test-rg", + "connectorName": "C1", + "backupName": "dbBackup", + "api-version": "2023-10-01-preview", + "body": { + "tags": {}, + "location": "westcentralus", + "properties": { + "backupData": { + "backupType": "SQL", + "recoveryServicesVault": { + "name": "test-vault", + "resourceGroup": "test-rg", + "vaultType": "New" + }, + "backupPolicy": { + "name": "defaultSqlPolicy", + "properties": { + "backupManagementType": "AzureWorkload", + "workLoadType": "SQLDataBase", + "settings": { + "timeZone": "UTC", + "issqlcompression": true, + "isCompression": true + }, + "subProtectionPolicy": [ + { + "policyType": "Full", + "schedulePolicy": { + "schedulePolicyType": "SimpleSchedulePolicy", + "scheduleRunFrequency": "Weekly", + "scheduleRunDays": [ + "Sunday" + ], + "scheduleRunTimes": [ + "2022-11-29T19:30:00.000Z" + ] + }, + "retentionPolicy": { + "retentionPolicyType": "LongTermRetentionPolicy", + "dailySchedule": null, + "weeklySchedule": { + "daysOfTheWeek": [ + "Sunday" + ], + "retentionTimes": [ + "2022-11-29T19:30:00.000Z" + ], + "retentionDuration": { + "count": 104, + "durationType": "Weeks" + } + }, + "monthlySchedule": { + "retentionScheduleFormatType": "Weekly", + "retentionScheduleDaily": null, + "retentionScheduleWeekly": { + "daysOfTheWeek": [ + "Sunday" + ], + "weeksOfTheMonth": [ + "First" + ] + }, + "retentionTimes": [ + "2022-11-29T19:30:00.000Z" + ], + "retentionDuration": { + "count": 60, + "durationType": "Months" + } + }, + "yearlySchedule": { + "retentionScheduleFormatType": "Weekly", + "monthsOfYear": [ + "January" + ], + "retentionScheduleDaily": null, + "retentionScheduleWeekly": { + "daysOfTheWeek": [ + "Sunday" + ], + "weeksOfTheMonth": [ + "First" + ] + }, + "retentionTimes": [ + "2022-11-29T19:30:00.000Z" + ], + "retentionDuration": { + "count": 10, + "durationType": "Years" + } + } + }, + "tieringPolicy": { + "ArchivedRP": { + "tieringMode": "TierAfter", + "duration": 45, + "durationType": "Days" + } + } + }, + { + "policyType": "Differential", + "schedulePolicy": { + "schedulePolicyType": "SimpleSchedulePolicy", + "scheduleRunFrequency": "Weekly", + "scheduleRunDays": [ + "Monday" + ], + "scheduleRunTimes": [ + "2022-09-29T02:00:00Z" + ], + "scheduleWeeklyFrequency": 0 + }, + "retentionPolicy": { + "retentionPolicyType": "SimpleRetentionPolicy", + "retentionDuration": { + "count": 30, + "durationType": "Days" + } + } + }, + { + "policyType": "Log", + "schedulePolicy": { + "schedulePolicyType": "LogSchedulePolicy", + "scheduleFrequencyInMins": 120 + }, + "retentionPolicy": { + "retentionPolicyType": "SimpleRetentionPolicy", + "retentionDuration": { + "count": 20, + "durationType": "Days" + } + } + } + ], + "protectedItemsCount": 0 + } + } + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/connectors/C1/acssBackups/vmBackup", + "name": "db1", + "type": "Microsoft.Workloads/connectors/acssBackups", + "tags": {}, + "location": "westcentralus", + "systemData": { + "createdBy": "user@xyz.com", + "createdByType": "User", + "createdAt": "2021-08-19T15:10:46.196Z", + "lastModifiedBy": "user@xyz.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-08-19T15:10:46.196Z" + }, + "properties": { + "backupData": { + "backupType": "SQL", + "recoveryServicesVault": { + "name": "test-vault", + "resourceGroup": "test-rg", + "vaultType": "New" + }, + "backupPolicy": { + "name": "defaultSqlPolicy", + "properties": { + "backupManagementType": "AzureWorkload", + "workLoadType": "SQLDataBase", + "settings": { + "timeZone": "UTC", + "issqlcompression": true, + "isCompression": true + }, + "subProtectionPolicy": [ + { + "policyType": "Full", + "schedulePolicy": { + "schedulePolicyType": "SimpleSchedulePolicy", + "scheduleRunFrequency": "Weekly", + "scheduleRunDays": [ + "Sunday" + ], + "scheduleRunTimes": [ + "2022-11-29T19:30:00.000Z" + ] + }, + "retentionPolicy": { + "retentionPolicyType": "LongTermRetentionPolicy", + "dailySchedule": null, + "weeklySchedule": { + "daysOfTheWeek": [ + "Sunday" + ], + "retentionTimes": [ + "2022-11-29T19:30:00.000Z" + ], + "retentionDuration": { + "count": 104, + "durationType": "Weeks" + } + }, + "monthlySchedule": { + "retentionScheduleFormatType": "Weekly", + "retentionScheduleDaily": null, + "retentionScheduleWeekly": { + "daysOfTheWeek": [ + "Sunday" + ], + "weeksOfTheMonth": [ + "First" + ] + }, + "retentionTimes": [ + "2022-11-29T19:30:00.000Z" + ], + "retentionDuration": { + "count": 60, + "durationType": "Months" + } + }, + "yearlySchedule": { + "retentionScheduleFormatType": "Weekly", + "monthsOfYear": [ + "January" + ], + "retentionScheduleDaily": null, + "retentionScheduleWeekly": { + "daysOfTheWeek": [ + "Sunday" + ], + "weeksOfTheMonth": [ + "First" + ] + }, + "retentionTimes": [ + "2022-11-29T19:30:00.000Z" + ], + "retentionDuration": { + "count": 10, + "durationType": "Years" + } + } + }, + "tieringPolicy": { + "ArchivedRP": { + "tieringMode": "TierAfter", + "duration": 45, + "durationType": "Days" + } + } + }, + { + "policyType": "Differential", + "schedulePolicy": { + "schedulePolicyType": "SimpleSchedulePolicy", + "scheduleRunFrequency": "Weekly", + "scheduleRunDays": [ + "Monday" + ], + "scheduleRunTimes": [ + "2022-09-29T02:00:00Z" + ], + "scheduleWeeklyFrequency": 0 + }, + "retentionPolicy": { + "retentionPolicyType": "SimpleRetentionPolicy", + "retentionDuration": { + "count": 30, + "durationType": "Days" + } + } + }, + { + "policyType": "Log", + "schedulePolicy": { + "schedulePolicyType": "LogSchedulePolicy", + "scheduleFrequencyInMins": 120 + }, + "retentionPolicy": { + "retentionPolicyType": "SimpleRetentionPolicy", + "retentionDuration": { + "count": 20, + "durationType": "Days" + } + } + } + ], + "protectedItemsCount": 0 + } + } + }, + "provisioningState": "Succeeded" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/connectors/C1/acssBackups/vmBackup", + "name": "db1", + "type": "Microsoft.Workloads/connectors/acssBackups", + "tags": {}, + "location": "westcentralus", + "systemData": { + "createdBy": "user@xyz.com", + "createdByType": "User", + "createdAt": "2021-08-19T15:10:46.196Z", + "lastModifiedBy": "user@xyz.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-08-19T15:10:46.196Z" + }, + "properties": { + "backupData": { + "backupType": "SQL", + "recoveryServicesVault": { + "name": "test-vault", + "resourceGroup": "test-rg", + "vaultType": "New" + }, + "backupPolicy": { + "name": "defaultSqlPolicy", + "properties": { + "backupManagementType": "AzureWorkload", + "workLoadType": "SQLDataBase", + "settings": { + "timeZone": "UTC", + "issqlcompression": true, + "isCompression": true + }, + "subProtectionPolicy": [ + { + "policyType": "Full", + "schedulePolicy": { + "schedulePolicyType": "SimpleSchedulePolicy", + "scheduleRunFrequency": "Weekly", + "scheduleRunDays": [ + "Sunday" + ], + "scheduleRunTimes": [ + "2022-11-29T19:30:00.000Z" + ] + }, + "retentionPolicy": { + "retentionPolicyType": "LongTermRetentionPolicy", + "dailySchedule": null, + "weeklySchedule": { + "daysOfTheWeek": [ + "Sunday" + ], + "retentionTimes": [ + "2022-11-29T19:30:00.000Z" + ], + "retentionDuration": { + "count": 104, + "durationType": "Weeks" + } + }, + "monthlySchedule": { + "retentionScheduleFormatType": "Weekly", + "retentionScheduleDaily": null, + "retentionScheduleWeekly": { + "daysOfTheWeek": [ + "Sunday" + ], + "weeksOfTheMonth": [ + "First" + ] + }, + "retentionTimes": [ + "2022-11-29T19:30:00.000Z" + ], + "retentionDuration": { + "count": 60, + "durationType": "Months" + } + }, + "yearlySchedule": { + "retentionScheduleFormatType": "Weekly", + "monthsOfYear": [ + "January" + ], + "retentionScheduleDaily": null, + "retentionScheduleWeekly": { + "daysOfTheWeek": [ + "Sunday" + ], + "weeksOfTheMonth": [ + "First" + ] + }, + "retentionTimes": [ + "2022-11-29T19:30:00.000Z" + ], + "retentionDuration": { + "count": 10, + "durationType": "Years" + } + } + }, + "tieringPolicy": { + "ArchivedRP": { + "tieringMode": "TierAfter", + "duration": 45, + "durationType": "Days" + } + } + }, + { + "policyType": "Differential", + "schedulePolicy": { + "schedulePolicyType": "SimpleSchedulePolicy", + "scheduleRunFrequency": "Weekly", + "scheduleRunDays": [ + "Monday" + ], + "scheduleRunTimes": [ + "2022-09-29T02:00:00Z" + ], + "scheduleWeeklyFrequency": 0 + }, + "retentionPolicy": { + "retentionPolicyType": "SimpleRetentionPolicy", + "retentionDuration": { + "count": 30, + "durationType": "Days" + } + } + }, + { + "policyType": "Log", + "schedulePolicy": { + "schedulePolicyType": "LogSchedulePolicy", + "scheduleFrequencyInMins": 120 + }, + "retentionPolicy": { + "retentionPolicyType": "SimpleRetentionPolicy", + "retentionDuration": { + "count": 20, + "durationType": "Days" + } + } + } + ], + "protectedItemsCount": 0 + } + } + }, + "provisioningState": "Creating" + } + } + } + } +} diff --git a/specification/workloads/resource-manager/Microsoft.Workloads/connectors/preview/2023-10-01-preview/examples/ACSSBackup/Update.json b/specification/workloads/resource-manager/Microsoft.Workloads/connectors/preview/2023-10-01-preview/examples/ACSSBackup/Update.json new file mode 100644 index 000000000000..a6af55458566 --- /dev/null +++ b/specification/workloads/resource-manager/Microsoft.Workloads/connectors/preview/2023-10-01-preview/examples/ACSSBackup/Update.json @@ -0,0 +1,55 @@ +{ + "parameters": { + "subscriptionId": "8e17e36c-42e9-4cd5-a078-7b44883414e0", + "resourceGroupName": "test-rg", + "connectorName": "C1", + "backupName": "vmBackup", + "api-version": "2023-10-01-preview", + "body": { + "tags": { + "tag1": "value1" + } + } + }, + "responses": { + "202": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/providers/Microsoft.Workloads/operationStatuses/{operationId}" + } + }, + "200": { + "body": { + "id": "/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/connectors/C1/acssBackups/vmBackup", + "name": "db1", + "type": "Microsoft.Workloads/connectors/acssBackups", + "tags": {}, + "location": "westcentralus", + "systemData": { + "createdBy": "user@xyz.com", + "createdByType": "User", + "createdAt": "2021-08-19T15:10:46.196Z", + "lastModifiedBy": "user@xyz.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-08-19T15:10:46.196Z" + }, + "properties": { + "backupData": { + "backupType": "VM", + "recoveryServicesVault": { + "id": "/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.RecoveryServices/vaults/test-vault", + "vaultType": "Existing" + }, + "backupPolicy": { + "name": "defaultVmPolicy" + }, + "diskExclusionProperties": { + "diskLunList": [], + "isInclusionList": true + } + }, + "provisioningState": "Succeeded" + } + } + } + } +} diff --git a/specification/workloads/resource-manager/Microsoft.Workloads/connectors/preview/2023-10-01-preview/examples/ACSSBackup/VM_Existing_Create.json b/specification/workloads/resource-manager/Microsoft.Workloads/connectors/preview/2023-10-01-preview/examples/ACSSBackup/VM_Existing_Create.json new file mode 100644 index 000000000000..2d54d4ba84dd --- /dev/null +++ b/specification/workloads/resource-manager/Microsoft.Workloads/connectors/preview/2023-10-01-preview/examples/ACSSBackup/VM_Existing_Create.json @@ -0,0 +1,99 @@ +{ + "parameters": { + "subscriptionId": "8e17e36c-42e9-4cd5-a078-7b44883414e0", + "resourceGroupName": "test-rg", + "connectorName": "C1", + "backupName": "vmBackup", + "api-version": "2023-10-01-preview", + "body": { + "tags": {}, + "location": "westcentralus", + "properties": { + "backupData": { + "backupType": "VM", + "recoveryServicesVault": { + "id": "/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.RecoveryServices/vaults/test-vault", + "vaultType": "Existing" + }, + "backupPolicy": { + "name": "defaultVmPolicy" + }, + "diskExclusionProperties": { + "diskLunList": [], + "isInclusionList": true + } + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/connectors/C1/acssBackups/vmBackup", + "name": "db1", + "type": "Microsoft.Workloads/connectors/acssBackups", + "tags": {}, + "location": "westcentralus", + "systemData": { + "createdBy": "user@xyz.com", + "createdByType": "User", + "createdAt": "2021-08-19T15:10:46.196Z", + "lastModifiedBy": "user@xyz.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-08-19T15:10:46.196Z" + }, + "properties": { + "backupData": { + "backupType": "VM", + "recoveryServicesVault": { + "id": "/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.RecoveryServices/vaults/test-vault", + "vaultType": "Existing" + }, + "backupPolicy": { + "name": "defaultVmPolicy" + }, + "diskExclusionProperties": { + "diskLunList": [], + "isInclusionList": true + } + }, + "provisioningState": "Succeeded" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/connectors/C1/acssBackups/vmBackup", + "name": "db1", + "type": "Microsoft.Workloads/connectors/acssBackups", + "tags": {}, + "location": "westcentralus", + "systemData": { + "createdBy": "user@xyz.com", + "createdByType": "User", + "createdAt": "2021-08-19T15:10:46.196Z", + "lastModifiedBy": "user@xyz.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-08-19T15:10:46.196Z" + }, + "properties": { + "backupData": { + "backupType": "VM", + "recoveryServicesVault": { + "id": "/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.RecoveryServices/vaults/test-vault", + "vaultType": "Existing" + }, + "backupPolicy": { + "name": "defaultVmPolicy" + }, + "diskExclusionProperties": { + "diskLunList": [], + "isInclusionList": true + } + }, + "provisioningState": "Creating" + } + } + } + } +} diff --git a/specification/workloads/resource-manager/Microsoft.Workloads/connectors/preview/2023-10-01-preview/examples/ACSSBackup/VM_NewPolicy.json b/specification/workloads/resource-manager/Microsoft.Workloads/connectors/preview/2023-10-01-preview/examples/ACSSBackup/VM_NewPolicy.json new file mode 100644 index 000000000000..ebdaf631a39c --- /dev/null +++ b/specification/workloads/resource-manager/Microsoft.Workloads/connectors/preview/2023-10-01-preview/examples/ACSSBackup/VM_NewPolicy.json @@ -0,0 +1,375 @@ +{ + "parameters": { + "subscriptionId": "8e17e36c-42e9-4cd5-a078-7b44883414e0", + "resourceGroupName": "test-rg", + "connectorName": "C1", + "backupName": "vmBackup", + "api-version": "2023-10-01-preview", + "body": { + "tags": {}, + "location": "westcentralus", + "properties": { + "backupData": { + "backupType": "VM", + "recoveryServicesVault": { + "name": "test-vault", + "resourceGroup": "test-rg", + "vaultType": "New" + }, + "backupPolicy": { + "name": "defaultVmPolicy", + "properties": { + "backupManagementType": "AzureIaasVM", + "policyType": "V1", + "schedulePolicy": { + "schedulePolicyType": "SimpleSchedulePolicy", + "scheduleRunFrequency": "Daily", + "scheduleRunDays": null, + "scheduleRunTimes": [ + "2022-11-29T19:30:00.000Z" + ] + }, + "timeZone": "UTC", + "instantRpRetentionRangeInDays": 2, + "retentionPolicy": { + "retentionPolicyType": "LongTermRetentionPolicy", + "dailySchedule": { + "retentionTimes": [ + "2022-11-29T19:30:00.000Z" + ], + "retentionDuration": { + "count": 30, + "durationType": "Days" + } + }, + "weeklySchedule": { + "daysOfTheWeek": [ + "Sunday" + ], + "retentionTimes": [ + "2022-11-29T19:30:00.000Z" + ], + "retentionDuration": { + "count": 12, + "durationType": "Weeks" + } + }, + "monthlySchedule": { + "retentionScheduleFormatType": "Weekly", + "retentionScheduleDaily": null, + "retentionScheduleWeekly": { + "daysOfTheWeek": [ + "Sunday" + ], + "weeksOfTheMonth": [ + "First" + ] + }, + "retentionTimes": [ + "2022-11-29T19:30:00.000Z" + ], + "retentionDuration": { + "count": 60, + "durationType": "Months" + } + }, + "yearlySchedule": { + "retentionScheduleFormatType": "Weekly", + "monthsOfYear": [ + "January" + ], + "retentionScheduleDaily": null, + "retentionScheduleWeekly": { + "daysOfTheWeek": [ + "Sunday" + ], + "weeksOfTheMonth": [ + "First" + ] + }, + "retentionTimes": [ + "2022-11-29T19:30:00.000Z" + ], + "retentionDuration": { + "count": 10, + "durationType": "Years" + } + } + }, + "instantRPDetails": { + "azureBackupRGNamePrefix": "dasas", + "azureBackupRGNameSuffix": "a" + }, + "protectedItemsCount": 0, + "tieringPolicy": { + "ArchivedRP": { + "tieringMode": "TierAfter", + "duration": 3, + "durationType": "Months" + } + } + } + }, + "diskExclusionProperties": { + "diskLunList": [], + "isInclusionList": true + } + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/connectors/C1/acssBackups/vmBackup", + "name": "db1", + "type": "Microsoft.Workloads/connectors/acssBackups", + "tags": {}, + "location": "westcentralus", + "systemData": { + "createdBy": "user@xyz.com", + "createdByType": "User", + "createdAt": "2021-08-19T15:10:46.196Z", + "lastModifiedBy": "user@xyz.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-08-19T15:10:46.196Z" + }, + "properties": { + "backupData": { + "backupType": "VM", + "recoveryServicesVault": { + "name": "test-vault", + "resourceGroup": "test-rg", + "vaultType": "New" + }, + "backupPolicy": { + "name": "defaultVmPolicy", + "properties": { + "backupManagementType": "AzureIaasVM", + "policyType": "V1", + "schedulePolicy": { + "schedulePolicyType": "SimpleSchedulePolicy", + "scheduleRunFrequency": "Daily", + "scheduleRunDays": null, + "scheduleRunTimes": [ + "2022-11-29T19:30:00.000Z" + ] + }, + "timeZone": "UTC", + "instantRpRetentionRangeInDays": 2, + "retentionPolicy": { + "retentionPolicyType": "LongTermRetentionPolicy", + "dailySchedule": { + "retentionTimes": [ + "2022-11-29T19:30:00.000Z" + ], + "retentionDuration": { + "count": 30, + "durationType": "Days" + } + }, + "weeklySchedule": { + "daysOfTheWeek": [ + "Sunday" + ], + "retentionTimes": [ + "2022-11-29T19:30:00.000Z" + ], + "retentionDuration": { + "count": 12, + "durationType": "Weeks" + } + }, + "monthlySchedule": { + "retentionScheduleFormatType": "Weekly", + "retentionScheduleDaily": null, + "retentionScheduleWeekly": { + "daysOfTheWeek": [ + "Sunday" + ], + "weeksOfTheMonth": [ + "First" + ] + }, + "retentionTimes": [ + "2022-11-29T19:30:00.000Z" + ], + "retentionDuration": { + "count": 60, + "durationType": "Months" + } + }, + "yearlySchedule": { + "retentionScheduleFormatType": "Weekly", + "monthsOfYear": [ + "January" + ], + "retentionScheduleDaily": null, + "retentionScheduleWeekly": { + "daysOfTheWeek": [ + "Sunday" + ], + "weeksOfTheMonth": [ + "First" + ] + }, + "retentionTimes": [ + "2022-11-29T19:30:00.000Z" + ], + "retentionDuration": { + "count": 10, + "durationType": "Years" + } + } + }, + "instantRPDetails": { + "azureBackupRGNamePrefix": "dasas", + "azureBackupRGNameSuffix": "a" + }, + "protectedItemsCount": 0, + "tieringPolicy": { + "ArchivedRP": { + "tieringMode": "TierAfter", + "duration": 3, + "durationType": "Months" + } + } + } + }, + "diskExclusionProperties": { + "diskLunList": [], + "isInclusionList": true + } + }, + "provisioningState": "Succeeded" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/connectors/C1/acssBackups/vmBackup", + "name": "db1", + "type": "Microsoft.Workloads/connectors/acssBackups", + "tags": {}, + "location": "westcentralus", + "systemData": { + "createdBy": "user@xyz.com", + "createdByType": "User", + "createdAt": "2021-08-19T15:10:46.196Z", + "lastModifiedBy": "user@xyz.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-08-19T15:10:46.196Z" + }, + "properties": { + "backupData": { + "backupType": "VM", + "recoveryServicesVault": { + "name": "test-vault", + "resourceGroup": "test-rg", + "vaultType": "New" + }, + "backupPolicy": { + "name": "defaultVmPolicy", + "properties": { + "backupManagementType": "AzureIaasVM", + "policyType": "V1", + "schedulePolicy": { + "schedulePolicyType": "SimpleSchedulePolicy", + "scheduleRunFrequency": "Daily", + "scheduleRunDays": null, + "scheduleRunTimes": [ + "2022-11-29T19:30:00.000Z" + ] + }, + "timeZone": "UTC", + "instantRpRetentionRangeInDays": 2, + "retentionPolicy": { + "retentionPolicyType": "LongTermRetentionPolicy", + "dailySchedule": { + "retentionTimes": [ + "2022-11-29T19:30:00.000Z" + ], + "retentionDuration": { + "count": 30, + "durationType": "Days" + } + }, + "weeklySchedule": { + "daysOfTheWeek": [ + "Sunday" + ], + "retentionTimes": [ + "2022-11-29T19:30:00.000Z" + ], + "retentionDuration": { + "count": 12, + "durationType": "Weeks" + } + }, + "monthlySchedule": { + "retentionScheduleFormatType": "Weekly", + "retentionScheduleDaily": null, + "retentionScheduleWeekly": { + "daysOfTheWeek": [ + "Sunday" + ], + "weeksOfTheMonth": [ + "First" + ] + }, + "retentionTimes": [ + "2022-11-29T19:30:00.000Z" + ], + "retentionDuration": { + "count": 60, + "durationType": "Months" + } + }, + "yearlySchedule": { + "retentionScheduleFormatType": "Weekly", + "monthsOfYear": [ + "January" + ], + "retentionScheduleDaily": null, + "retentionScheduleWeekly": { + "daysOfTheWeek": [ + "Sunday" + ], + "weeksOfTheMonth": [ + "First" + ] + }, + "retentionTimes": [ + "2022-11-29T19:30:00.000Z" + ], + "retentionDuration": { + "count": 10, + "durationType": "Years" + } + } + }, + "instantRPDetails": { + "azureBackupRGNamePrefix": "dasas", + "azureBackupRGNameSuffix": "a" + }, + "protectedItemsCount": 0, + "tieringPolicy": { + "ArchivedRP": { + "tieringMode": "TierAfter", + "duration": 3, + "durationType": "Months" + } + } + } + }, + "diskExclusionProperties": { + "diskLunList": [], + "isInclusionList": true + } + }, + "provisioningState": "Creating" + } + } + } + } +} diff --git a/specification/workloads/resource-manager/Microsoft.Workloads/connectors/preview/2023-10-01-preview/examples/ACSSBackup/VM_New_Create.json b/specification/workloads/resource-manager/Microsoft.Workloads/connectors/preview/2023-10-01-preview/examples/ACSSBackup/VM_New_Create.json new file mode 100644 index 000000000000..2c6fee1b1044 --- /dev/null +++ b/specification/workloads/resource-manager/Microsoft.Workloads/connectors/preview/2023-10-01-preview/examples/ACSSBackup/VM_New_Create.json @@ -0,0 +1,180 @@ +{ + "parameters": { + "subscriptionId": "8e17e36c-42e9-4cd5-a078-7b44883414e0", + "resourceGroupName": "test-rg", + "connectorName": "C1", + "backupName": "vmBackup", + "api-version": "2023-10-01-preview", + "body": { + "tags": {}, + "location": "westcentralus", + "properties": { + "backupData": { + "backupType": "VM", + "recoveryServicesVault": { + "name": "test-vault", + "resourceGroup": "test-rg", + "vaultType": "New" + }, + "backupPolicy": { + "name": "defaultVmPolicy", + "properties": { + "backupManagementType": "AzureIaasVM", + "instantRPDetails": {}, + "schedulePolicy": { + "schedulePolicyType": "SimpleSchedulePolicy", + "scheduleRunFrequency": "Daily", + "scheduleRunTimes": [ + "2018-01-10T18:30:00Z" + ], + "scheduleWeeklyFrequency": 0 + }, + "retentionPolicy": { + "retentionPolicyType": "LongTermRetentionPolicy", + "dailySchedule": { + "retentionTimes": [ + "2018-01-10T18:30:00Z" + ], + "retentionDuration": { + "count": 30, + "durationType": "Days" + } + } + }, + "instantRpRetentionRangeInDays": 2, + "protectedItemsCount": 0 + } + }, + "diskExclusionProperties": { + "diskLunList": [], + "isInclusionList": true + } + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/connectors/C1/acssBackups/vmBackup", + "name": "db1", + "type": "Microsoft.Workloads/connectors/acssBackups", + "tags": {}, + "location": "westcentralus", + "systemData": { + "createdBy": "user@xyz.com", + "createdByType": "User", + "createdAt": "2021-08-19T15:10:46.196Z", + "lastModifiedBy": "user@xyz.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-08-19T15:10:46.196Z" + }, + "properties": { + "backupData": { + "backupType": "VM", + "recoveryServicesVault": { + "name": "test-vault", + "resourceGroup": "test-rg", + "vaultType": "New" + }, + "backupPolicy": { + "name": "defaultVmPolicy", + "properties": { + "backupManagementType": "AzureIaasVM", + "instantRPDetails": {}, + "schedulePolicy": { + "schedulePolicyType": "SimpleSchedulePolicy", + "scheduleRunFrequency": "Daily", + "scheduleRunTimes": [ + "2018-01-10T18:30:00Z" + ], + "scheduleWeeklyFrequency": 0 + }, + "retentionPolicy": { + "retentionPolicyType": "LongTermRetentionPolicy", + "dailySchedule": { + "retentionTimes": [ + "2018-01-10T18:30:00Z" + ], + "retentionDuration": { + "count": 30, + "durationType": "Days" + } + } + }, + "instantRpRetentionRangeInDays": 2, + "protectedItemsCount": 0 + } + }, + "diskExclusionProperties": { + "diskLunList": [], + "isInclusionList": true + } + }, + "provisioningState": "Succeeded" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/connectors/C1/acssBackups/vmBackup", + "name": "db1", + "type": "Microsoft.Workloads/connectors/acssBackups", + "tags": {}, + "location": "westcentralus", + "systemData": { + "createdBy": "user@xyz.com", + "createdByType": "User", + "createdAt": "2021-08-19T15:10:46.196Z", + "lastModifiedBy": "user@xyz.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-08-19T15:10:46.196Z" + }, + "properties": { + "backupData": { + "backupType": "VM", + "recoveryServicesVault": { + "name": "test-vault", + "resourceGroup": "test-rg", + "vaultType": "New" + }, + "backupPolicy": { + "name": "defaultVmPolicy", + "properties": { + "backupManagementType": "AzureIaasVM", + "instantRPDetails": {}, + "schedulePolicy": { + "schedulePolicyType": "SimpleSchedulePolicy", + "scheduleRunFrequency": "Daily", + "scheduleRunTimes": [ + "2018-01-10T18:30:00Z" + ], + "scheduleWeeklyFrequency": 0 + }, + "retentionPolicy": { + "retentionPolicyType": "LongTermRetentionPolicy", + "dailySchedule": { + "retentionTimes": [ + "2018-01-10T18:30:00Z" + ], + "retentionDuration": { + "count": 30, + "durationType": "Days" + } + } + }, + "instantRpRetentionRangeInDays": 2, + "protectedItemsCount": 0 + } + }, + "diskExclusionProperties": { + "diskLunList": [], + "isInclusionList": true + } + }, + "provisioningState": "Creating" + } + } + } + } +} diff --git a/specification/workloads/resource-manager/Microsoft.Workloads/connectors/preview/2023-10-01-preview/examples/connectors/Create.json b/specification/workloads/resource-manager/Microsoft.Workloads/connectors/preview/2023-10-01-preview/examples/connectors/Create.json new file mode 100644 index 000000000000..7fb5f0a09a85 --- /dev/null +++ b/specification/workloads/resource-manager/Microsoft.Workloads/connectors/preview/2023-10-01-preview/examples/connectors/Create.json @@ -0,0 +1,59 @@ +{ + "parameters": { + "subscriptionId": "8e17e36c-42e9-4cd5-a078-7b44883414e0", + "resourceGroupName": "test-rg", + "connectorName": "C1", + "api-version": "2023-10-01-preview", + "body": { + "tags": {}, + "location": "westcentralus", + "properties": { + "sourceResourceId": "/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/sapVirtualInstances/X00" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/connectors/C1", + "name": "C1", + "type": "Microsoft.Workloads/connectors", + "tags": {}, + "location": "westcentralus", + "systemData": { + "createdBy": "user@xyz.com", + "createdByType": "User", + "createdAt": "2021-08-19T15:10:46.196Z", + "lastModifiedBy": "user@xyz.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-08-19T15:10:46.196Z" + }, + "properties": { + "sourceResourceId": "/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/sapVirtualInstances/X00", + "provisioningState": "Succeeded" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/connectors/C1", + "name": "C1", + "type": "Microsoft.Workloads/connectors", + "tags": {}, + "location": "westcentralus", + "systemData": { + "createdBy": "user@xyz.com", + "createdByType": "User", + "createdAt": "2021-08-19T15:10:46.196Z", + "lastModifiedBy": "user@xyz.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-08-19T15:10:46.196Z" + }, + "properties": { + "sourceResourceId": "/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/sapVirtualInstances/X00", + "provisioningState": "Creating" + } + } + } + } +} diff --git a/specification/workloads/resource-manager/Microsoft.Workloads/connectors/preview/2023-10-01-preview/examples/connectors/Delete.json b/specification/workloads/resource-manager/Microsoft.Workloads/connectors/preview/2023-10-01-preview/examples/connectors/Delete.json new file mode 100644 index 000000000000..f09146ffa721 --- /dev/null +++ b/specification/workloads/resource-manager/Microsoft.Workloads/connectors/preview/2023-10-01-preview/examples/connectors/Delete.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "subscriptionId": "6d875e77-e412-4d7d-9af4-8895278b4443", + "resourceGroupName": "test-rg", + "connectorName": "C1", + "api-version": "2023-10-01-preview" + }, + "responses": { + "202": { + "headers": { + "Location": "https://management.azure.com/providers/Microsoft.Workloads/operationResults/{operationId}", + "Azure-AsyncOperation": "https://management.azure.com/providers/Microsoft.Workloads/operationStatuses/{operationId}" + } + }, + "204": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/providers/Microsoft.Workloads/operationStatuses/{operationId}" + } + } + } +} diff --git a/specification/workloads/resource-manager/Microsoft.Workloads/connectors/preview/2023-10-01-preview/examples/connectors/Get.json b/specification/workloads/resource-manager/Microsoft.Workloads/connectors/preview/2023-10-01-preview/examples/connectors/Get.json new file mode 100644 index 000000000000..0414043068d7 --- /dev/null +++ b/specification/workloads/resource-manager/Microsoft.Workloads/connectors/preview/2023-10-01-preview/examples/connectors/Get.json @@ -0,0 +1,31 @@ +{ + "parameters": { + "subscriptionId": "8e17e36c-42e9-4cd5-a078-7b44883414e0", + "resourceGroupName": "test-rg", + "connectorName": "C1", + "api-version": "2023-10-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/connectors/C1", + "name": "C1", + "type": "Microsoft.Workloads/connectors", + "tags": {}, + "location": "westcentralus", + "systemData": { + "createdBy": "user@xyz.com", + "createdByType": "User", + "createdAt": "2021-08-19T15:10:46.196Z", + "lastModifiedBy": "user@xyz.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-08-19T15:10:46.196Z" + }, + "properties": { + "sourceResourceId": "/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/sapVirtualInstances/X00", + "provisioningState": "Succeeded" + } + } + } + } +} diff --git a/specification/workloads/resource-manager/Microsoft.Workloads/connectors/preview/2023-10-01-preview/examples/connectors/ListByResourceGroup.json b/specification/workloads/resource-manager/Microsoft.Workloads/connectors/preview/2023-10-01-preview/examples/connectors/ListByResourceGroup.json new file mode 100644 index 000000000000..b36012d47846 --- /dev/null +++ b/specification/workloads/resource-manager/Microsoft.Workloads/connectors/preview/2023-10-01-preview/examples/connectors/ListByResourceGroup.json @@ -0,0 +1,53 @@ +{ + "parameters": { + "subscriptionId": "6d875e77-e412-4d7d-9af4-8895278b4443", + "resourceGroupName": "test-rg", + "api-version": "2023-10-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/connectors/C1", + "name": "C1", + "type": "Microsoft.Workloads/connectors", + "tags": {}, + "location": "westcentralus", + "systemData": { + "createdBy": "user@xyz.com", + "createdByType": "User", + "createdAt": "2021-08-19T15:10:46.196Z", + "lastModifiedBy": "user@xyz.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-08-19T15:10:46.196Z" + }, + "properties": { + "sourceResourceId": "/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/sapVirtualInstances/X00", + "provisioningState": "Succeeded" + } + }, + { + "id": "/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/connectors/C2", + "name": "C2", + "type": "Microsoft.Workloads/connectors", + "tags": {}, + "location": "westcentralus", + "systemData": { + "createdBy": "user@xyz.com", + "createdByType": "User", + "createdAt": "2021-08-19T15:10:46.196Z", + "lastModifiedBy": "user@xyz.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-08-19T15:10:46.196Z" + }, + "properties": { + "sourceResourceId": "/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/sapVirtualInstances/X01", + "provisioningState": "Succeeded" + } + } + ] + } + } + } +} diff --git a/specification/workloads/resource-manager/Microsoft.Workloads/connectors/preview/2023-10-01-preview/examples/connectors/ListBySubscription.json b/specification/workloads/resource-manager/Microsoft.Workloads/connectors/preview/2023-10-01-preview/examples/connectors/ListBySubscription.json new file mode 100644 index 000000000000..316da5056368 --- /dev/null +++ b/specification/workloads/resource-manager/Microsoft.Workloads/connectors/preview/2023-10-01-preview/examples/connectors/ListBySubscription.json @@ -0,0 +1,52 @@ +{ + "parameters": { + "subscriptionId": "6d875e77-e412-4d7d-9af4-8895278b4443", + "api-version": "2023-10-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/connectors/C1", + "name": "C1", + "type": "Microsoft.Workloads/connectors", + "tags": {}, + "location": "westcentralus", + "systemData": { + "createdBy": "user@xyz.com", + "createdByType": "User", + "createdAt": "2021-08-19T15:10:46.196Z", + "lastModifiedBy": "user@xyz.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-08-19T15:10:46.196Z" + }, + "properties": { + "sourceResourceId": "/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/sapVirtualInstances/X00", + "provisioningState": "Succeeded" + } + }, + { + "id": "/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/connectors/C2", + "name": "C2", + "type": "Microsoft.Workloads/connectors", + "tags": {}, + "location": "westcentralus", + "systemData": { + "createdBy": "user@xyz.com", + "createdByType": "User", + "createdAt": "2021-08-19T15:10:46.196Z", + "lastModifiedBy": "user@xyz.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-08-19T15:10:46.196Z" + }, + "properties": { + "sourceResourceId": "/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/sapVirtualInstances/X01", + "provisioningState": "Succeeded" + } + } + ] + } + } + } +} diff --git a/specification/workloads/resource-manager/Microsoft.Workloads/connectors/preview/2023-10-01-preview/examples/connectors/Update.json b/specification/workloads/resource-manager/Microsoft.Workloads/connectors/preview/2023-10-01-preview/examples/connectors/Update.json new file mode 100644 index 000000000000..1a18f50278af --- /dev/null +++ b/specification/workloads/resource-manager/Microsoft.Workloads/connectors/preview/2023-10-01-preview/examples/connectors/Update.json @@ -0,0 +1,38 @@ +{ + "parameters": { + "subscriptionId": "8e17e36c-42e9-4cd5-a078-7b44883414e0", + "resourceGroupName": "test-rg", + "connectorName": "C1", + "api-version": "2023-10-01-preview", + "body": { + "tags": { + "tag1": "value1" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/connectors/C1", + "name": "C1", + "type": "Microsoft.Workloads/connectors", + "tags": { + "tag1": "value1" + }, + "location": "westcentralus", + "systemData": { + "createdBy": "user@xyz.com", + "createdByType": "User", + "createdAt": "2021-08-19T15:10:46.196Z", + "lastModifiedBy": "user@xyz.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-08-19T15:10:46.196Z" + }, + "properties": { + "sourceResourceId": "/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/sapVirtualInstances/X00", + "provisioningState": "Succeeded" + } + } + } + } +} diff --git a/specification/workloads/resource-manager/Microsoft.Workloads/connectors/readme.az.md b/specification/workloads/resource-manager/Microsoft.Workloads/connectors/readme.az.md new file mode 100644 index 000000000000..75854afec15b --- /dev/null +++ b/specification/workloads/resource-manager/Microsoft.Workloads/connectors/readme.az.md @@ -0,0 +1,16 @@ +## AZ + +These settings apply only when `--az` is specified on the command line. + +For new Resource Provider. It is highly recommended to onboard Azure CLI extensions. There's no differences in terms of customer usage. + +``` yaml $(az) && $(target-mode) != 'core' +az: + extensions: connector + namespace: azure.mgmt.workloads.connector + package-name: azure-mgmt-workloads-connector +az-output-folder: $(azure-cli-extension-folder)/src/workloads/connector +python-sdk-output-folder: "$(az-output-folder)/azext_workloads/vendored_sdks/workloads/connector" +# add additional configuration here specific for Azure CLI +# refer to the faq.md for more details +``` \ No newline at end of file diff --git a/specification/workloads/resource-manager/Microsoft.Workloads/connectors/readme.cli.md b/specification/workloads/resource-manager/Microsoft.Workloads/connectors/readme.cli.md new file mode 100644 index 000000000000..c6cf6ad37ea4 --- /dev/null +++ b/specification/workloads/resource-manager/Microsoft.Workloads/connectors/readme.cli.md @@ -0,0 +1 @@ +## CLI Common Settings for all the command line tools \ No newline at end of file diff --git a/specification/workloads/resource-manager/Microsoft.Workloads/connectors/readme.csharp.md b/specification/workloads/resource-manager/Microsoft.Workloads/connectors/readme.csharp.md new file mode 100644 index 000000000000..43592aae9eae --- /dev/null +++ b/specification/workloads/resource-manager/Microsoft.Workloads/connectors/readme.csharp.md @@ -0,0 +1,14 @@ +## C# + +These settings apply only when `--csharp` is specified on the command line. +Please also specify `--csharp-sdks-folder=`. + +```yaml $(csharp) +csharp: + azure-arm: true + license-header: MICROSOFT_MIT_NO_VERSION + namespace: Microsoft.Workloads.Connector + payload-flattening-threshold: 1 + output-folder: $(csharp-sdks-folder)/workloads/Microsoft.Workloads.Connector/src/Generated + clear-output-folder: true +``` \ No newline at end of file diff --git a/specification/workloads/resource-manager/Microsoft.Workloads/connectors/readme.go.md b/specification/workloads/resource-manager/Microsoft.Workloads/connectors/readme.go.md new file mode 100644 index 000000000000..33699d4373a4 --- /dev/null +++ b/specification/workloads/resource-manager/Microsoft.Workloads/connectors/readme.go.md @@ -0,0 +1,11 @@ +## Go + +These settings apply only when `--go` is specified on the command line. + +```yaml $(go) && $(track2) +azure-arm: true +license-header: MICROSOFT_MIT_NO_VERSION +module-name: sdk/resourcemanager/workloads/armconnector +module: github.com/Azure/azure-sdk-for-go/$(module-name) +output-folder: $(go-sdk-folder)/$(module-name) +``` \ No newline at end of file diff --git a/specification/workloads/resource-manager/Microsoft.Workloads/connectors/readme.md b/specification/workloads/resource-manager/Microsoft.Workloads/connectors/readme.md new file mode 100644 index 000000000000..fc088edb5b20 --- /dev/null +++ b/specification/workloads/resource-manager/Microsoft.Workloads/connectors/readme.md @@ -0,0 +1,83 @@ +# workloads + +> see https://aka.ms/autorest + +This is the AutoRest configuration file for workloads. + +## Getting Started + +To build the SDKs for My API, simply install AutoRest via `npm` (`npm install -g autorest`) and then run: + +> `autorest readme.md` + +To see additional help and options, run: + +> `autorest --help` + +For other options on installation see [Installing AutoRest](https://aka.ms/autorest/install) on the AutoRest github page. + +--- + +## Configuration + +### Basic Information + +These are the global settings for the workloads. + +``` yaml +openapi-type: arm +openapi-subtype: rpaas +tag: package-preview-2023-10 +``` + + +### Tag: package-preview-2023-10 + +These settings apply only when `--tag=package-preview-2023-10` is specified on the command line. + +```yaml $(tag) == 'package-preview-2023-10' +input-file: + - preview/2023-10-01-preview/connectors.json + - ../common-types/v1/commonTypes.json + - ../operations/preview/2023-10-01-preview/operations.json +``` + +--- + +# Code Generation + +## Swagger to SDK + +This section describes what SDK should be generated by the automatic system. +This is not used by Autorest itself. + +``` yaml $(swagger-to-sdk) +swagger-to-sdk: + - repo: azure-sdk-for-python-track2 + - repo: azure-sdk-for-java + - repo: azure-sdk-for-go + - repo: azure-sdk-for-js + - repo: azure-sdk-for-net-track2 + - repo: azure-resource-manager-schemas + - repo: azure-cli-extensions +``` + +## Az + +See configuration in [readme.az.md](./readme.az.md) + +## Go + +See configuration in [readme.go.md](./readme.go.md) + +## Python + +See configuration in [readme.python.md](./readme.python.md) + +## TypeScript + +See configuration in [readme.typescript.md](./readme.typescript.md) + +## CSharp + +See configuration in [readme.csharp.md](./readme.csharp.md) diff --git a/specification/workloads/resource-manager/Microsoft.Workloads/connectors/readme.python.md b/specification/workloads/resource-manager/Microsoft.Workloads/connectors/readme.python.md new file mode 100644 index 000000000000..9a12365cceb1 --- /dev/null +++ b/specification/workloads/resource-manager/Microsoft.Workloads/connectors/readme.python.md @@ -0,0 +1,19 @@ +## Python + +These settings apply only when `--python` is specified on the command line. +Please also specify `--python-sdks-folder=`. + +``` yaml $(python) +title: ConnectorMgmtClient +azure-arm: true +license-header: MICROSOFT_MIT_NO_VERSION +package-name: azure-mgmt-workloads-connector +namespace: azure.mgmt.workloads.connector +package-version: 1.0.0b1 +clear-output-folder: true +``` + +``` yaml $(python) +no-namespace-folders: true +output-folder: $(python-sdks-folder)/workloads/azure-mgmt-workloads/azure/mgmt/connector +``` diff --git a/specification/workloads/resource-manager/Microsoft.Workloads/connectors/readme.typescript.md b/specification/workloads/resource-manager/Microsoft.Workloads/connectors/readme.typescript.md new file mode 100644 index 000000000000..6991b9875aa3 --- /dev/null +++ b/specification/workloads/resource-manager/Microsoft.Workloads/connectors/readme.typescript.md @@ -0,0 +1,14 @@ +## TypeScript + +These settings apply only when `--typescript` is specified on the command line. +Please also specify `--typescript-sdks-folder=`. + +``` yaml $(typescript) +typescript: + azure-arm: true + package-name: "@azure/arm-workloads-connector" + output-folder: "$(typescript-sdks-folder)/sdk/workloads/arm-connector" + payload-flattening-threshold: 1 + clear-output-folder: true + generate-metadata: true +```