Skip to content

Commit 5760819

Browse files
author
SDKAuto
committed
CodeGen from PR 25713 in Azure/azure-rest-api-specs
Merge 9ab65c969351f616e27787332eb98cbcc75a3331 into 1d7059db3c66d17d75e325d15c597ebbecfc60f4
1 parent 91dac22 commit 5760819

File tree

406 files changed

+886
-18190
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

406 files changed

+886
-18190
lines changed

sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Release History
22

3-
## 1.2.0-beta.1 (Unreleased)
3+
## 1.0.0-beta.1 (2023-09-22)
4+
5+
- Azure Resource Manager RecoveryServicesBackup client library for Java. This package contains Microsoft Azure SDK for RecoveryServicesBackup Management SDK. Open API 2.0 Specs for Azure RecoveryServices Backup service. Package tag package-2023-04. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
46

57
### Features Added
68

sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/README.md

Lines changed: 101 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Azure Resource Manager RecoveryServicesBackup client library for Java.
44

5-
This package contains Microsoft Azure SDK for RecoveryServicesBackup Management SDK. Open API 2.0 Specs for Azure RecoveryServices Backup service. Package tag package-2023-02. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
5+
This package contains Microsoft Azure SDK for RecoveryServicesBackup Management SDK. Open API 2.0 Specs for Azure RecoveryServices Backup service. Package tag package-2023-04. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
66

77
## We'd love to hear your feedback
88

@@ -32,7 +32,7 @@ Various documentation is available to help you get started
3232
<dependency>
3333
<groupId>com.azure.resourcemanager</groupId>
3434
<artifactId>azure-resourcemanager-recoveryservicesbackup</artifactId>
35-
<version>1.1.0</version>
35+
<version>1.2.0-beta.1</version>
3636
</dependency>
3737
```
3838
[//]: # ({x-version-update-end})
@@ -74,6 +74,103 @@ See [API design][design] for general introduction on design and key concepts on
7474

7575
## Examples
7676

77+
```java
78+
OffsetDateTime scheduleDateTime = OffsetDateTime.parse(
79+
OffsetDateTime.now(Clock.systemUTC())
80+
.withNano(0).withMinute(0).withSecond(0)
81+
.plusDays(1).format(DateTimeFormatter.ISO_INSTANT));
82+
83+
List<SubProtectionPolicy> lstSubProtectionPolicy = Arrays.asList(
84+
new SubProtectionPolicy()
85+
.withPolicyType(PolicyType.FULL)
86+
.withSchedulePolicy(
87+
new SimpleSchedulePolicy()
88+
.withScheduleRunFrequency(ScheduleRunType.WEEKLY)
89+
.withScheduleRunDays(Arrays.asList(DayOfWeek.SUNDAY, DayOfWeek.TUESDAY))
90+
.withScheduleRunTimes(Arrays.asList(scheduleDateTime)))
91+
.withRetentionPolicy(
92+
new LongTermRetentionPolicy()
93+
.withWeeklySchedule(
94+
new WeeklyRetentionSchedule()
95+
.withDaysOfTheWeek(Arrays.asList(DayOfWeek.SUNDAY, DayOfWeek.TUESDAY))
96+
.withRetentionTimes(Arrays.asList(scheduleDateTime))
97+
.withRetentionDuration(
98+
new RetentionDuration()
99+
.withCount(2)
100+
.withDurationType(RetentionDurationType.WEEKS)))
101+
.withMonthlySchedule(
102+
new MonthlyRetentionSchedule()
103+
.withRetentionScheduleFormatType(RetentionScheduleFormat.WEEKLY)
104+
.withRetentionScheduleWeekly(
105+
new WeeklyRetentionFormat()
106+
.withDaysOfTheWeek(Arrays.asList(DayOfWeek.SUNDAY))
107+
.withWeeksOfTheMonth(Arrays.asList(WeekOfMonth.SECOND)))
108+
.withRetentionTimes(Arrays.asList(scheduleDateTime))
109+
.withRetentionDuration(
110+
new RetentionDuration()
111+
.withCount(1)
112+
.withDurationType(RetentionDurationType.MONTHS)))
113+
.withYearlySchedule(
114+
new YearlyRetentionSchedule()
115+
.withRetentionScheduleFormatType(RetentionScheduleFormat.WEEKLY)
116+
.withMonthsOfYear(Arrays.asList(MonthOfYear.JANUARY, MonthOfYear.JUNE, MonthOfYear.DECEMBER))
117+
.withRetentionScheduleWeekly(
118+
new WeeklyRetentionFormat()
119+
.withDaysOfTheWeek(Arrays.asList(DayOfWeek.SUNDAY))
120+
.withWeeksOfTheMonth(Arrays.asList(WeekOfMonth.LAST)))
121+
.withRetentionTimes(Arrays.asList(scheduleDateTime))
122+
.withRetentionDuration(
123+
new RetentionDuration()
124+
.withCount(1)
125+
.withDurationType(RetentionDurationType.YEARS)))),
126+
new SubProtectionPolicy()
127+
.withPolicyType(PolicyType.DIFFERENTIAL)
128+
.withSchedulePolicy(
129+
new SimpleSchedulePolicy()
130+
.withScheduleRunFrequency(ScheduleRunType.WEEKLY)
131+
.withScheduleRunDays(Arrays.asList(DayOfWeek.FRIDAY))
132+
.withScheduleRunTimes(Arrays.asList(scheduleDateTime)))
133+
.withRetentionPolicy(
134+
new SimpleRetentionPolicy()
135+
.withRetentionDuration(
136+
new RetentionDuration()
137+
.withCount(8)
138+
.withDurationType(RetentionDurationType.DAYS))),
139+
new SubProtectionPolicy()
140+
.withPolicyType(PolicyType.LOG)
141+
.withSchedulePolicy(new LogSchedulePolicy().withScheduleFrequencyInMins(60))
142+
.withRetentionPolicy(
143+
new SimpleRetentionPolicy()
144+
.withRetentionDuration(
145+
new RetentionDuration()
146+
.withCount(7)
147+
.withDurationType(RetentionDurationType.DAYS))));
148+
149+
vault = recoveryServicesManager.vaults()
150+
.define(vaultName)
151+
.withRegion(REGION)
152+
.withExistingResourceGroup(resourceGroupName)
153+
.withSku(new Sku().withName(SkuName.RS0).withTier("Standard"))
154+
.withProperties(new VaultProperties()
155+
.withPublicNetworkAccess(PublicNetworkAccess.ENABLED)
156+
.withRestoreSettings(new RestoreSettings()
157+
.withCrossSubscriptionRestoreSettings(
158+
new CrossSubscriptionRestoreSettings()
159+
.withCrossSubscriptionRestoreState(CrossSubscriptionRestoreState.ENABLED))))
160+
.create();
161+
162+
protectionPolicyResource = recoveryServicesBackupManager.protectionPolicies()
163+
.define(policyName)
164+
.withRegion(REGION)
165+
.withExistingVault(vaultName, resourceGroupName)
166+
.withProperties(
167+
new AzureVmWorkloadProtectionPolicy()
168+
.withWorkLoadType(WorkloadType.SQLDATA_BASE)
169+
.withSettings(new Settings().withTimeZone("Pacific Standard Time").withIssqlcompression(false))
170+
.withSubProtectionPolicy(lstSubProtectionPolicy)
171+
)
172+
.create();
173+
```
77174
[Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/SAMPLE.md)
78175

79176

@@ -103,3 +200,5 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m
103200
[cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md
104201
[coc]: https://opensource.microsoft.com/codeofconduct/
105202
[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/
203+
204+
![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-java%2Fsdk%2Frecoveryservicesbackup%2Fazure-resourcemanager-recoveryservicesbackup%2FREADME.png)

0 commit comments

Comments
 (0)