Skip to content

Commit b5985b2

Browse files
author
SDKAuto
committed
CodeGen from PR 25264 in Azure/azure-rest-api-specs
Merge 0b3bf4bf70cdab8a267e52e9134811b206a1ab25 into 0c4762d037f0d00d4e384add4e3d7200a2993b2c
1 parent 843160b commit b5985b2

File tree

301 files changed

+5351
-9926
lines changed

Some content is hidden

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

301 files changed

+5351
-9926
lines changed

sdk/dataprotection/azure-resourcemanager-dataprotection/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-08-28)
4+
5+
- Azure Resource Manager DataProtection client library for Java. This package contains Microsoft Azure SDK for DataProtection Management SDK. Open API 2.0 Specs for Azure Data Protection service. Package tag package-preview-2023-06. 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/dataprotection/azure-resourcemanager-dataprotection/README.md

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

33
Azure Resource Manager DataProtection client library for Java.
44

5-
This package contains Microsoft Azure SDK for DataProtection Management SDK. Open API 2.0 Specs for Azure Data Protection service. Package tag package-2023-05. 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 DataProtection Management SDK. Open API 2.0 Specs for Azure Data Protection service. Package tag package-preview-2023-06. 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-dataprotection</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,41 @@ See [API design][design] for general introduction on design and key concepts on
7474

7575
## Examples
7676

77+
```java
78+
resource = dataProtectionManager
79+
.backupVaults()
80+
.define(vaultName)
81+
.withRegion(REGION)
82+
.withExistingResourceGroup(resourceGroupName)
83+
.withProperties(
84+
new BackupVault()
85+
.withMonitoringSettings(
86+
new MonitoringSettings()
87+
.withAzureMonitorAlertSettings(
88+
new AzureMonitorAlertSettings()
89+
.withAlertsForAllJobFailures(AlertsState.ENABLED)))
90+
.withSecuritySettings(
91+
new SecuritySettings()
92+
.withSoftDeleteSettings(
93+
new SoftDeleteSettings()
94+
.withState(SoftDeleteState.ALWAYS_ON)
95+
.withRetentionDurationInDays(14.0D))
96+
.withImmutabilitySettings(
97+
new ImmutabilitySettings()
98+
.withState(ImmutabilityState.LOCKED)))
99+
.withStorageSettings(
100+
Collections.singletonList(
101+
new StorageSetting()
102+
.withDatastoreType(StorageSettingStoreTypes.VAULT_STORE)
103+
.withType(StorageSettingTypes.LOCALLY_REDUNDANT)))
104+
.withFeatureSettings(
105+
new FeatureSettings()
106+
.withCrossSubscriptionRestoreSettings(
107+
new CrossSubscriptionRestoreSettings()
108+
.withState(CrossSubscriptionRestoreState.ENABLED))))
109+
.withIdentity(new DppIdentityDetails().withType("systemAssigned"))
110+
.create();
111+
```
77112
[Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/dataprotection/azure-resourcemanager-dataprotection/SAMPLE.md)
78113

79114

sdk/dataprotection/azure-resourcemanager-dataprotection/SAMPLE.md

Lines changed: 422 additions & 70 deletions
Large diffs are not rendered by default.

sdk/dataprotection/azure-resourcemanager-dataprotection/pom.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<packaging>jar</packaging>
1919

2020
<name>Microsoft Azure SDK for DataProtection Management</name>
21-
<description>This package contains Microsoft Azure SDK for DataProtection Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Open API 2.0 Specs for Azure Data Protection service. Package tag package-2023-05.</description>
21+
<description>This package contains Microsoft Azure SDK for DataProtection Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Open API 2.0 Specs for Azure Data Protection service. Package tag package-preview-2023-06.</description>
2222
<url>https://github.com/Azure/azure-sdk-for-java</url>
2323

2424
<licenses>
@@ -45,6 +45,7 @@
4545
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
4646
<jacoco.min.linecoverage>0</jacoco.min.linecoverage>
4747
<jacoco.min.branchcoverage>0</jacoco.min.branchcoverage>
48+
<revapi.skip>true</revapi.skip>
4849
</properties>
4950
<dependencies>
5051
<dependency>

sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/DataProtectionManager.java

Lines changed: 72 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,13 @@
2424
import com.azure.core.util.Configuration;
2525
import com.azure.core.util.logging.ClientLogger;
2626
import com.azure.resourcemanager.dataprotection.fluent.DataProtectionClient;
27+
import com.azure.resourcemanager.dataprotection.implementation.BackupInstancesExtensionRoutingsImpl;
2728
import com.azure.resourcemanager.dataprotection.implementation.BackupInstancesImpl;
2829
import com.azure.resourcemanager.dataprotection.implementation.BackupPoliciesImpl;
2930
import com.azure.resourcemanager.dataprotection.implementation.BackupVaultOperationResultsImpl;
3031
import com.azure.resourcemanager.dataprotection.implementation.BackupVaultsImpl;
32+
import com.azure.resourcemanager.dataprotection.implementation.CrossRegionRestoreJobsImpl;
33+
import com.azure.resourcemanager.dataprotection.implementation.CrossRegionRestoreJobsOperationsImpl;
3134
import com.azure.resourcemanager.dataprotection.implementation.DataProtectionClientBuilder;
3235
import com.azure.resourcemanager.dataprotection.implementation.DataProtectionOperationsImpl;
3336
import com.azure.resourcemanager.dataprotection.implementation.DataProtectionsImpl;
@@ -43,10 +46,14 @@
4346
import com.azure.resourcemanager.dataprotection.implementation.RecoveryPointsImpl;
4447
import com.azure.resourcemanager.dataprotection.implementation.ResourceGuardsImpl;
4548
import com.azure.resourcemanager.dataprotection.implementation.RestorableTimeRangesImpl;
49+
import com.azure.resourcemanager.dataprotection.implementation.SecondaryRPsImpl;
4650
import com.azure.resourcemanager.dataprotection.models.BackupInstances;
51+
import com.azure.resourcemanager.dataprotection.models.BackupInstancesExtensionRoutings;
4752
import com.azure.resourcemanager.dataprotection.models.BackupPolicies;
4853
import com.azure.resourcemanager.dataprotection.models.BackupVaultOperationResults;
4954
import com.azure.resourcemanager.dataprotection.models.BackupVaults;
55+
import com.azure.resourcemanager.dataprotection.models.CrossRegionRestoreJobs;
56+
import com.azure.resourcemanager.dataprotection.models.CrossRegionRestoreJobsOperations;
5057
import com.azure.resourcemanager.dataprotection.models.DataProtectionOperations;
5158
import com.azure.resourcemanager.dataprotection.models.DataProtections;
5259
import com.azure.resourcemanager.dataprotection.models.DeletedBackupInstances;
@@ -61,6 +68,7 @@
6168
import com.azure.resourcemanager.dataprotection.models.RecoveryPoints;
6269
import com.azure.resourcemanager.dataprotection.models.ResourceGuards;
6370
import com.azure.resourcemanager.dataprotection.models.RestorableTimeRanges;
71+
import com.azure.resourcemanager.dataprotection.models.SecondaryRPs;
6472
import java.time.Duration;
6573
import java.time.temporal.ChronoUnit;
6674
import java.util.ArrayList;
@@ -92,6 +100,14 @@ public final class DataProtectionManager {
92100

93101
private RecoveryPoints recoveryPoints;
94102

103+
private SecondaryRPs secondaryRPs;
104+
105+
private CrossRegionRestoreJobs crossRegionRestoreJobs;
106+
107+
private CrossRegionRestoreJobsOperations crossRegionRestoreJobsOperations;
108+
109+
private BackupInstancesExtensionRoutings backupInstancesExtensionRoutings;
110+
95111
private Jobs jobs;
96112

97113
private RestorableTimeRanges restorableTimeRanges;
@@ -271,7 +287,7 @@ public DataProtectionManager authenticate(TokenCredential credential, AzureProfi
271287
.append("-")
272288
.append("com.azure.resourcemanager.dataprotection")
273289
.append("/")
274-
.append("1.1.0");
290+
.append("1.0.0-beta.1");
275291
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
276292
userAgentBuilder
277293
.append(" (")
@@ -465,6 +481,57 @@ public RecoveryPoints recoveryPoints() {
465481
return recoveryPoints;
466482
}
467483

484+
/**
485+
* Gets the resource collection API of SecondaryRPs.
486+
*
487+
* @return Resource collection API of SecondaryRPs.
488+
*/
489+
public SecondaryRPs secondaryRPs() {
490+
if (this.secondaryRPs == null) {
491+
this.secondaryRPs = new SecondaryRPsImpl(clientObject.getSecondaryRPs(), this);
492+
}
493+
return secondaryRPs;
494+
}
495+
496+
/**
497+
* Gets the resource collection API of CrossRegionRestoreJobs.
498+
*
499+
* @return Resource collection API of CrossRegionRestoreJobs.
500+
*/
501+
public CrossRegionRestoreJobs crossRegionRestoreJobs() {
502+
if (this.crossRegionRestoreJobs == null) {
503+
this.crossRegionRestoreJobs =
504+
new CrossRegionRestoreJobsImpl(clientObject.getCrossRegionRestoreJobs(), this);
505+
}
506+
return crossRegionRestoreJobs;
507+
}
508+
509+
/**
510+
* Gets the resource collection API of CrossRegionRestoreJobsOperations.
511+
*
512+
* @return Resource collection API of CrossRegionRestoreJobsOperations.
513+
*/
514+
public CrossRegionRestoreJobsOperations crossRegionRestoreJobsOperations() {
515+
if (this.crossRegionRestoreJobsOperations == null) {
516+
this.crossRegionRestoreJobsOperations =
517+
new CrossRegionRestoreJobsOperationsImpl(clientObject.getCrossRegionRestoreJobsOperations(), this);
518+
}
519+
return crossRegionRestoreJobsOperations;
520+
}
521+
522+
/**
523+
* Gets the resource collection API of BackupInstancesExtensionRoutings.
524+
*
525+
* @return Resource collection API of BackupInstancesExtensionRoutings.
526+
*/
527+
public BackupInstancesExtensionRoutings backupInstancesExtensionRoutings() {
528+
if (this.backupInstancesExtensionRoutings == null) {
529+
this.backupInstancesExtensionRoutings =
530+
new BackupInstancesExtensionRoutingsImpl(clientObject.getBackupInstancesExtensionRoutings(), this);
531+
}
532+
return backupInstancesExtensionRoutings;
533+
}
534+
468535
/**
469536
* Gets the resource collection API of Jobs.
470537
*
@@ -553,8 +620,10 @@ public DppResourceGuardProxies dppResourceGuardProxies() {
553620
}
554621

555622
/**
556-
* @return Wrapped service client DataProtectionClient providing direct access to the underlying auto-generated API
557-
* implementation, based on Azure REST API.
623+
* Gets wrapped service client DataProtectionClient providing direct access to the underlying auto-generated API
624+
* implementation, based on Azure REST API.
625+
*
626+
* @return Wrapped service client DataProtectionClient.
558627
*/
559628
public DataProtectionClient serviceClient() {
560629
return this.clientObject;

sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/BackupInstancesClient.java

Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,10 @@
1515
import com.azure.resourcemanager.dataprotection.fluent.models.OperationJobExtendedInfoInner;
1616
import com.azure.resourcemanager.dataprotection.models.AzureBackupRehydrationRequest;
1717
import com.azure.resourcemanager.dataprotection.models.AzureBackupRestoreRequest;
18+
import com.azure.resourcemanager.dataprotection.models.CrossRegionRestoreRequestObject;
1819
import com.azure.resourcemanager.dataprotection.models.SyncBackupInstanceRequest;
1920
import com.azure.resourcemanager.dataprotection.models.TriggerBackupRequest;
21+
import com.azure.resourcemanager.dataprotection.models.ValidateCrossRegionRestoreRequestObject;
2022
import com.azure.resourcemanager.dataprotection.models.ValidateForBackupRequest;
2123
import com.azure.resourcemanager.dataprotection.models.ValidateRestoreRequestObject;
2224

@@ -380,6 +382,135 @@ Response<BackupInstanceResourceInner> getBackupInstanceOperationResultWithRespon
380382
BackupInstanceResourceInner getBackupInstanceOperationResult(
381383
String resourceGroupName, String vaultName, String backupInstanceName, String operationId);
382384

385+
/**
386+
* The triggerCrossRegionRestore operation.
387+
*
388+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
389+
* @param location The location parameter.
390+
* @param parameters Request body for trigger CRR operation.
391+
* @throws IllegalArgumentException thrown if parameters fail the validation.
392+
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
393+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
394+
* @return the {@link SyncPoller} for polling of operationJobExtendedInfo.
395+
*/
396+
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
397+
SyncPoller<PollResult<OperationJobExtendedInfoInner>, OperationJobExtendedInfoInner> beginTriggerCrossRegionRestore(
398+
String resourceGroupName, String location, CrossRegionRestoreRequestObject parameters);
399+
400+
/**
401+
* The triggerCrossRegionRestore operation.
402+
*
403+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
404+
* @param location The location parameter.
405+
* @param parameters Request body for trigger CRR operation.
406+
* @param context The context to associate with this operation.
407+
* @throws IllegalArgumentException thrown if parameters fail the validation.
408+
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
409+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
410+
* @return the {@link SyncPoller} for polling of operationJobExtendedInfo.
411+
*/
412+
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
413+
SyncPoller<PollResult<OperationJobExtendedInfoInner>, OperationJobExtendedInfoInner> beginTriggerCrossRegionRestore(
414+
String resourceGroupName, String location, CrossRegionRestoreRequestObject parameters, Context context);
415+
416+
/**
417+
* The triggerCrossRegionRestore operation.
418+
*
419+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
420+
* @param location The location parameter.
421+
* @param parameters Request body for trigger CRR operation.
422+
* @throws IllegalArgumentException thrown if parameters fail the validation.
423+
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
424+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
425+
* @return operationJobExtendedInfo.
426+
*/
427+
@ServiceMethod(returns = ReturnType.SINGLE)
428+
OperationJobExtendedInfoInner triggerCrossRegionRestore(
429+
String resourceGroupName, String location, CrossRegionRestoreRequestObject parameters);
430+
431+
/**
432+
* The triggerCrossRegionRestore operation.
433+
*
434+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
435+
* @param location The location parameter.
436+
* @param parameters Request body for trigger CRR operation.
437+
* @param context The context to associate with this operation.
438+
* @throws IllegalArgumentException thrown if parameters fail the validation.
439+
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
440+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
441+
* @return operationJobExtendedInfo.
442+
*/
443+
@ServiceMethod(returns = ReturnType.SINGLE)
444+
OperationJobExtendedInfoInner triggerCrossRegionRestore(
445+
String resourceGroupName, String location, CrossRegionRestoreRequestObject parameters, Context context);
446+
447+
/**
448+
* The validateCrossRegionRestore operation.
449+
*
450+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
451+
* @param location The location parameter.
452+
* @param parameters Request body for operation.
453+
* @throws IllegalArgumentException thrown if parameters fail the validation.
454+
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
455+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
456+
* @return the {@link SyncPoller} for polling of operationJobExtendedInfo.
457+
*/
458+
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
459+
SyncPoller<PollResult<OperationJobExtendedInfoInner>, OperationJobExtendedInfoInner>
460+
beginValidateCrossRegionRestore(
461+
String resourceGroupName, String location, ValidateCrossRegionRestoreRequestObject parameters);
462+
463+
/**
464+
* The validateCrossRegionRestore operation.
465+
*
466+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
467+
* @param location The location parameter.
468+
* @param parameters Request body for operation.
469+
* @param context The context to associate with this operation.
470+
* @throws IllegalArgumentException thrown if parameters fail the validation.
471+
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
472+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
473+
* @return the {@link SyncPoller} for polling of operationJobExtendedInfo.
474+
*/
475+
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
476+
SyncPoller<PollResult<OperationJobExtendedInfoInner>, OperationJobExtendedInfoInner>
477+
beginValidateCrossRegionRestore(
478+
String resourceGroupName,
479+
String location,
480+
ValidateCrossRegionRestoreRequestObject parameters,
481+
Context context);
482+
483+
/**
484+
* The validateCrossRegionRestore operation.
485+
*
486+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
487+
* @param location The location parameter.
488+
* @param parameters Request body for operation.
489+
* @throws IllegalArgumentException thrown if parameters fail the validation.
490+
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
491+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
492+
* @return operationJobExtendedInfo.
493+
*/
494+
@ServiceMethod(returns = ReturnType.SINGLE)
495+
OperationJobExtendedInfoInner validateCrossRegionRestore(
496+
String resourceGroupName, String location, ValidateCrossRegionRestoreRequestObject parameters);
497+
498+
/**
499+
* The validateCrossRegionRestore operation.
500+
*
501+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
502+
* @param location The location parameter.
503+
* @param parameters Request body for operation.
504+
* @param context The context to associate with this operation.
505+
* @throws IllegalArgumentException thrown if parameters fail the validation.
506+
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
507+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
508+
* @return operationJobExtendedInfo.
509+
*/
510+
@ServiceMethod(returns = ReturnType.SINGLE)
511+
OperationJobExtendedInfoInner validateCrossRegionRestore(
512+
String resourceGroupName, String location, ValidateCrossRegionRestoreRequestObject parameters, Context context);
513+
383514
/**
384515
* rehydrate recovery point for restore for a BackupInstance.
385516
*

0 commit comments

Comments
 (0)