Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
452 changes: 448 additions & 4 deletions sdk/oracledatabase/azure-resourcemanager-oracledatabase/CHANGELOG.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Azure Resource Manager OracleDatabase client library for Java.

This package contains Microsoft Azure SDK for OracleDatabase Management SDK. Package tag package-2023-09-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
This package contains Microsoft Azure SDK for OracleDatabase Management SDK. Package tag package-2025-03-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).

## We'd love to hear your feedback

Expand Down Expand Up @@ -52,15 +52,15 @@ Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment
Assuming the use of the `DefaultAzureCredential` credential class, the client can be authenticated using the following code:

```java
AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE);
AzureProfile profile = new AzureProfile(AzureCloud.AZURE_PUBLIC_CLOUD);
TokenCredential credential = new DefaultAzureCredentialBuilder()
.authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint())
.build();
OracleDatabaseManager manager = OracleDatabaseManager
.authenticate(credential, profile);
```

The sample code assumes global Azure. Please change `AzureEnvironment.AZURE` variable if otherwise.
The sample code assumes global Azure. Please change the `AzureCloud.AZURE_PUBLIC_CLOUD` variable if otherwise.

See [Authentication][authenticate] for more options.

Expand Down Expand Up @@ -100,5 +100,3 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m
[cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md
[coc]: https://opensource.microsoft.com/codeofconduct/
[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/


1,039 changes: 917 additions & 122 deletions sdk/oracledatabase/azure-resourcemanager-oracledatabase/SAMPLE.md

Large diffs are not rendered by default.

14 changes: 8 additions & 6 deletions sdk/oracledatabase/azure-resourcemanager-oracledatabase/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<packaging>jar</packaging>

<name>Microsoft Azure SDK for OracleDatabase Management</name>
<description>This package contains Microsoft Azure SDK for OracleDatabase Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Package tag package-2023-09-01.</description>
<description>This package contains Microsoft Azure SDK for OracleDatabase Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Package tag package-2025-03-01.</description>
<url>https://github.com/Azure/azure-sdk-for-java</url>

<licenses>
Expand All @@ -45,13 +45,10 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jacoco.min.linecoverage>0</jacoco.min.linecoverage>
<jacoco.min.branchcoverage>0</jacoco.min.branchcoverage>
<revapi.skip>true</revapi.skip>
<spotless.skip>false</spotless.skip>
</properties>
<dependencies>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-json</artifactId>
<version>1.5.0</version> <!-- {x-version-update;com.azure:azure-json;dependency} -->
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-core</artifactId>
Expand All @@ -62,6 +59,11 @@
<artifactId>azure-core-management</artifactId>
<version>1.17.0</version> <!-- {x-version-update;com.azure:azure-core-management;dependency} -->
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-json</artifactId>
<version>1.5.0</version> <!-- {x-version-update;com.azure:azure-json;dependency} -->
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-core-test</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,31 +11,37 @@
import com.azure.core.http.HttpPipelinePosition;
import com.azure.core.http.policy.AddDatePolicy;
import com.azure.core.http.policy.AddHeadersFromContextPolicy;
import com.azure.core.http.policy.HttpLoggingPolicy;
import com.azure.core.http.policy.BearerTokenAuthenticationPolicy;
import com.azure.core.http.policy.HttpLogOptions;
import com.azure.core.http.policy.HttpLoggingPolicy;
import com.azure.core.http.policy.HttpPipelinePolicy;
import com.azure.core.http.policy.HttpPolicyProviders;
import com.azure.core.http.policy.RequestIdPolicy;
import com.azure.core.http.policy.RetryOptions;
import com.azure.core.http.policy.RetryPolicy;
import com.azure.core.http.policy.UserAgentPolicy;
import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy;
import com.azure.core.management.profile.AzureProfile;
import com.azure.core.util.Configuration;
import com.azure.core.util.CoreUtils;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.oracledatabase.fluent.OracleDatabaseResourceManager;
import com.azure.resourcemanager.oracledatabase.implementation.AutonomousDatabaseBackupsImpl;
import com.azure.resourcemanager.oracledatabase.implementation.AutonomousDatabaseCharacterSetsImpl;
import com.azure.resourcemanager.oracledatabase.implementation.AutonomousDatabaseNationalCharacterSetsImpl;
import com.azure.resourcemanager.oracledatabase.implementation.AutonomousDatabasesImpl;
import com.azure.resourcemanager.oracledatabase.implementation.AutonomousDatabaseVersionsImpl;
import com.azure.resourcemanager.oracledatabase.implementation.AutonomousDatabasesImpl;
import com.azure.resourcemanager.oracledatabase.implementation.CloudExadataInfrastructuresImpl;
import com.azure.resourcemanager.oracledatabase.implementation.CloudVmClustersImpl;
import com.azure.resourcemanager.oracledatabase.implementation.DbNodesImpl;
import com.azure.resourcemanager.oracledatabase.implementation.DbServersImpl;
import com.azure.resourcemanager.oracledatabase.implementation.DbSystemShapesImpl;
import com.azure.resourcemanager.oracledatabase.implementation.DnsPrivateViewsImpl;
import com.azure.resourcemanager.oracledatabase.implementation.DnsPrivateZonesImpl;
import com.azure.resourcemanager.oracledatabase.implementation.ExadbVmClustersImpl;
import com.azure.resourcemanager.oracledatabase.implementation.ExascaleDbNodesImpl;
import com.azure.resourcemanager.oracledatabase.implementation.ExascaleDbStorageVaultsImpl;
import com.azure.resourcemanager.oracledatabase.implementation.FlexComponentsImpl;
import com.azure.resourcemanager.oracledatabase.implementation.GiMinorVersionsImpl;
import com.azure.resourcemanager.oracledatabase.implementation.GiVersionsImpl;
import com.azure.resourcemanager.oracledatabase.implementation.OperationsImpl;
import com.azure.resourcemanager.oracledatabase.implementation.OracleDatabaseResourceManagerBuilder;
Expand All @@ -45,15 +51,20 @@
import com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseBackups;
import com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseCharacterSets;
import com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseNationalCharacterSets;
import com.azure.resourcemanager.oracledatabase.models.AutonomousDatabases;
import com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseVersions;
import com.azure.resourcemanager.oracledatabase.models.AutonomousDatabases;
import com.azure.resourcemanager.oracledatabase.models.CloudExadataInfrastructures;
import com.azure.resourcemanager.oracledatabase.models.CloudVmClusters;
import com.azure.resourcemanager.oracledatabase.models.DbNodes;
import com.azure.resourcemanager.oracledatabase.models.DbServers;
import com.azure.resourcemanager.oracledatabase.models.DbSystemShapes;
import com.azure.resourcemanager.oracledatabase.models.DnsPrivateViews;
import com.azure.resourcemanager.oracledatabase.models.DnsPrivateZones;
import com.azure.resourcemanager.oracledatabase.models.ExadbVmClusters;
import com.azure.resourcemanager.oracledatabase.models.ExascaleDbNodes;
import com.azure.resourcemanager.oracledatabase.models.ExascaleDbStorageVaults;
import com.azure.resourcemanager.oracledatabase.models.FlexComponents;
import com.azure.resourcemanager.oracledatabase.models.GiMinorVersions;
import com.azure.resourcemanager.oracledatabase.models.GiVersions;
import com.azure.resourcemanager.oracledatabase.models.Operations;
import com.azure.resourcemanager.oracledatabase.models.OracleSubscriptions;
Expand All @@ -63,6 +74,7 @@
import java.time.temporal.ChronoUnit;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.stream.Collectors;

Expand All @@ -78,6 +90,10 @@ public final class OracleDatabaseManager {

private CloudVmClusters cloudVmClusters;

private ExadbVmClusters exadbVmClusters;

private ExascaleDbStorageVaults exascaleDbStorageVaults;

private AutonomousDatabaseCharacterSets autonomousDatabaseCharacterSets;

private AutonomousDatabaseNationalCharacterSets autonomousDatabaseNationalCharacterSets;
Expand All @@ -90,8 +106,12 @@ public final class OracleDatabaseManager {

private DnsPrivateZones dnsPrivateZones;

private FlexComponents flexComponents;

private GiVersions giVersions;

private GiMinorVersions giMinorVersions;

private SystemVersions systemVersions;

private OracleSubscriptions oracleSubscriptions;
Expand All @@ -104,6 +124,8 @@ public final class OracleDatabaseManager {

private VirtualNetworkAddresses virtualNetworkAddresses;

private ExascaleDbNodes exascaleDbNodes;

private final OracleDatabaseResourceManager clientObject;

private OracleDatabaseManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) {
Expand Down Expand Up @@ -156,6 +178,9 @@ public static Configurable configure() {
*/
public static final class Configurable {
private static final ClientLogger LOGGER = new ClientLogger(Configurable.class);
private static final String SDK_VERSION = "version";
private static final Map<String, String> PROPERTIES
= CoreUtils.getProperties("azure-resourcemanager-oracledatabase.properties");

private HttpClient httpClient;
private HttpLogOptions httpLogOptions;
Expand Down Expand Up @@ -263,12 +288,14 @@ public OracleDatabaseManager authenticate(TokenCredential credential, AzureProfi
Objects.requireNonNull(credential, "'credential' cannot be null.");
Objects.requireNonNull(profile, "'profile' cannot be null.");

String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion");

StringBuilder userAgentBuilder = new StringBuilder();
userAgentBuilder.append("azsdk-java")
.append("-")
.append("com.azure.resourcemanager.oracledatabase")
.append("/")
.append("1.0.0");
.append(clientVersion);
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder.append(" (")
.append(Configuration.getGlobalConfiguration().get("java.version"))
Expand Down Expand Up @@ -301,7 +328,7 @@ public OracleDatabaseManager authenticate(TokenCredential credential, AzureProfi
HttpPolicyProviders.addBeforeRetryPolicies(policies);
policies.add(retryPolicy);
policies.add(new AddDatePolicy());
policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0])));
policies.add(new BearerTokenAuthenticationPolicy(credential, scopes.toArray(new String[0])));
policies.addAll(this.policies.stream()
.filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
.collect(Collectors.toList()));
Expand Down Expand Up @@ -363,6 +390,31 @@ public CloudVmClusters cloudVmClusters() {
return cloudVmClusters;
}

/**
* Gets the resource collection API of ExadbVmClusters. It manages ExadbVmCluster.
*
* @return Resource collection API of ExadbVmClusters.
*/
public ExadbVmClusters exadbVmClusters() {
if (this.exadbVmClusters == null) {
this.exadbVmClusters = new ExadbVmClustersImpl(clientObject.getExadbVmClusters(), this);
}
return exadbVmClusters;
}

/**
* Gets the resource collection API of ExascaleDbStorageVaults. It manages ExascaleDbStorageVault.
*
* @return Resource collection API of ExascaleDbStorageVaults.
*/
public ExascaleDbStorageVaults exascaleDbStorageVaults() {
if (this.exascaleDbStorageVaults == null) {
this.exascaleDbStorageVaults
= new ExascaleDbStorageVaultsImpl(clientObject.getExascaleDbStorageVaults(), this);
}
return exascaleDbStorageVaults;
}

/**
* Gets the resource collection API of AutonomousDatabaseCharacterSets.
*
Expand Down Expand Up @@ -438,6 +490,18 @@ public DnsPrivateZones dnsPrivateZones() {
return dnsPrivateZones;
}

/**
* Gets the resource collection API of FlexComponents.
*
* @return Resource collection API of FlexComponents.
*/
public FlexComponents flexComponents() {
if (this.flexComponents == null) {
this.flexComponents = new FlexComponentsImpl(clientObject.getFlexComponents(), this);
}
return flexComponents;
}

/**
* Gets the resource collection API of GiVersions.
*
Expand All @@ -450,6 +514,18 @@ public GiVersions giVersions() {
return giVersions;
}

/**
* Gets the resource collection API of GiMinorVersions.
*
* @return Resource collection API of GiMinorVersions.
*/
public GiMinorVersions giMinorVersions() {
if (this.giMinorVersions == null) {
this.giMinorVersions = new GiMinorVersionsImpl(clientObject.getGiMinorVersions(), this);
}
return giMinorVersions;
}

/**
* Gets the resource collection API of SystemVersions.
*
Expand Down Expand Up @@ -524,6 +600,18 @@ public VirtualNetworkAddresses virtualNetworkAddresses() {
return virtualNetworkAddresses;
}

/**
* Gets the resource collection API of ExascaleDbNodes.
*
* @return Resource collection API of ExascaleDbNodes.
*/
public ExascaleDbNodes exascaleDbNodes() {
if (this.exascaleDbNodes == null) {
this.exascaleDbNodes = new ExascaleDbNodesImpl(clientObject.getExascaleDbNodes(), this);
}
return exascaleDbNodes;
}

/**
* Gets wrapped service client OracleDatabaseResourceManager providing direct access to the underlying
* auto-generated API implementation, based on Azure REST API.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ public interface AutonomousDatabaseBackupsClient {
* {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<AutonomousDatabaseBackupInner> listByAutonomousDatabase(String resourceGroupName,
String autonomousdatabasename);
PagedIterable<AutonomousDatabaseBackupInner> listByParent(String resourceGroupName, String autonomousdatabasename);

/**
* List AutonomousDatabaseBackup resources by AutonomousDatabase.
Expand All @@ -46,8 +45,8 @@ PagedIterable<AutonomousDatabaseBackupInner> listByAutonomousDatabase(String res
* {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<AutonomousDatabaseBackupInner> listByAutonomousDatabase(String resourceGroupName,
String autonomousdatabasename, Context context);
PagedIterable<AutonomousDatabaseBackupInner> listByParent(String resourceGroupName, String autonomousdatabasename,
Context context);

/**
* Get a AutonomousDatabaseBackup.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/
public interface AutonomousDatabaseCharacterSetsClient {
/**
* List AutonomousDatabaseCharacterSet resources by Location.
* List AutonomousDatabaseCharacterSet resources by SubscriptionLocationResource.
*
* @param location The name of the Azure region.
* @throws IllegalArgumentException thrown if parameters fail the validation.
Expand All @@ -29,7 +29,7 @@ public interface AutonomousDatabaseCharacterSetsClient {
PagedIterable<AutonomousDatabaseCharacterSetInner> listByLocation(String location);

/**
* List AutonomousDatabaseCharacterSet resources by Location.
* List AutonomousDatabaseCharacterSet resources by SubscriptionLocationResource.
*
* @param location The name of the Azure region.
* @param context The context to associate with this operation.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/
public interface AutonomousDatabaseNationalCharacterSetsClient {
/**
* List AutonomousDatabaseNationalCharacterSet resources by Location.
* List AutonomousDatabaseNationalCharacterSet resources by SubscriptionLocationResource.
*
* @param location The name of the Azure region.
* @throws IllegalArgumentException thrown if parameters fail the validation.
Expand All @@ -30,7 +30,7 @@ public interface AutonomousDatabaseNationalCharacterSetsClient {
PagedIterable<AutonomousDatabaseNationalCharacterSetInner> listByLocation(String location);

/**
* List AutonomousDatabaseNationalCharacterSet resources by Location.
* List AutonomousDatabaseNationalCharacterSet resources by SubscriptionLocationResource.
*
* @param location The name of the Azure region.
* @param context The context to associate with this operation.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/
public interface AutonomousDatabaseVersionsClient {
/**
* List AutonomousDbVersion resources by Location.
* List AutonomousDbVersion resources by SubscriptionLocationResource.
*
* @param location The name of the Azure region.
* @throws IllegalArgumentException thrown if parameters fail the validation.
Expand All @@ -28,7 +28,7 @@ public interface AutonomousDatabaseVersionsClient {
PagedIterable<AutonomousDbVersionInner> listByLocation(String location);

/**
* List AutonomousDbVersion resources by Location.
* List AutonomousDbVersion resources by SubscriptionLocationResource.
*
* @param location The name of the Azure region.
* @param context The context to associate with this operation.
Expand Down
Loading