Skip to content
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 7 additions & 9 deletions sdk/databricks/azure-resourcemanager-databricks/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Azure Resource Manager AzureDatabricks client library for Java
# Azure Resource Manager Azure Databricks client library for Java

Azure Resource Manager AzureDatabricks client library for Java.
Azure Resource Manager Azure Databricks client library for Java.

This package contains Microsoft Azure SDK for AzureDatabricks Management SDK. The Microsoft Azure management APIs allow end users to operate on Azure Databricks Workspace / Access Connector resources. Package tag package-2023-05-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 Azure Databricks Management SDK. ARM Databricks. Package api-version 2026-01-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();
AzureDatabricksManager manager = AzureDatabricksManager
.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 All @@ -75,8 +75,8 @@ workspace = databricksManager.workspaces()
.define(workspaceName)
.withRegion(REGION)
.withExistingResourceGroup(resourceGroupName)
.withManagedResourceGroupId(managedResourceGroupId)
.withSku(new Sku().withName("standard"))
.withComputeMode(ComputeMode.SERVERLESS)
.withSku(new Sku().withName("premium"))
.create();
```
[Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/databricks/azure-resourcemanager-databricks/SAMPLE.md)
Expand Down Expand Up @@ -109,5 +109,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/


272 changes: 181 additions & 91 deletions sdk/databricks/azure-resourcemanager-databricks/SAMPLE.md

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions sdk/databricks/azure-resourcemanager-databricks/pom.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<!--
~ Copyright (c) Microsoft Corporation. All rights reserved.
~ Licensed under the MIT License.
~ Code generated by Microsoft (R) AutoRest Code Generator.
~ Code generated by Microsoft (R) TypeSpec Code Generator.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.azure</groupId>
Expand All @@ -17,8 +17,8 @@
<version>1.1.0-beta.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-databricks;current} -->
<packaging>jar</packaging>

<name>Microsoft Azure SDK for AzureDatabricks Management</name>
<description>This package contains Microsoft Azure SDK for AzureDatabricks Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. The Microsoft Azure management APIs allow end users to operate on Azure Databricks Workspace / Access Connector resources. Package tag package-2023-05-01.</description>
<name>Microsoft Azure SDK for Azure Databricks Management</name>
<description>This package contains Microsoft Azure SDK for Azure Databricks Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. ARM Databricks. Package api-version 2026-01-01.</description>
<url>https://github.com/Azure/azure-sdk-for-java</url>

<licenses>
Expand All @@ -45,7 +45,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jacoco.min.linecoverage>0</jacoco.min.linecoverage>
<jacoco.min.branchcoverage>0</jacoco.min.branchcoverage>
<spotless.skip>false</spotless.skip>
<revapi.skip>true</revapi.skip>
</properties>
<dependencies>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
// Code generated by Microsoft (R) TypeSpec Code Generator.

package com.azure.resourcemanager.databricks;

Expand All @@ -22,6 +22,7 @@
import com.azure.core.http.policy.UserAgentPolicy;
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.databricks.fluent.AzureDatabricksManagementClient;
import com.azure.resourcemanager.databricks.implementation.AccessConnectorsImpl;
Expand All @@ -43,28 +44,28 @@
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;

/**
* Entry point to AzureDatabricksManager.
* The Microsoft Azure management APIs allow end users to operate on Azure Databricks Workspace / Access Connector
* resources.
* ARM Databricks.
*/
public final class AzureDatabricksManager {
private Workspaces workspaces;

private Operations operations;

private PrivateLinkResources privateLinkResources;
private Workspaces workspaces;

private PrivateEndpointConnections privateEndpointConnections;

private AccessConnectors accessConnectors;

private OutboundNetworkDependenciesEndpoints outboundNetworkDependenciesEndpoints;

private VNetPeerings vNetPeerings;
private PrivateLinkResources privateLinkResources;

private AccessConnectors accessConnectors;
private VNetPeerings vNetPeerings;

private final AzureDatabricksManagementClient clientObject;

Expand All @@ -79,11 +80,11 @@ private AzureDatabricksManager(HttpPipeline httpPipeline, AzureProfile profile,
}

/**
* Creates an instance of AzureDatabricks service API entry point.
* Creates an instance of Azure Databricks service API entry point.
*
* @param credential the credential to use.
* @param profile the Azure profile for client.
* @return the AzureDatabricks service API instance.
* @return the Azure Databricks service API instance.
*/
public static AzureDatabricksManager authenticate(TokenCredential credential, AzureProfile profile) {
Objects.requireNonNull(credential, "'credential' cannot be null.");
Expand All @@ -92,11 +93,11 @@ public static AzureDatabricksManager authenticate(TokenCredential credential, Az
}

/**
* Creates an instance of AzureDatabricks service API entry point.
* Creates an instance of Azure Databricks service API entry point.
*
* @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential.
* @param profile the Azure profile for client.
* @return the AzureDatabricks service API instance.
* @return the Azure Databricks service API instance.
*/
public static AzureDatabricksManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) {
Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null.");
Expand All @@ -118,6 +119,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-databricks.properties");

private HttpClient httpClient;
private HttpLogOptions httpLogOptions;
Expand Down Expand Up @@ -215,22 +219,24 @@ public Configurable withDefaultPollInterval(Duration defaultPollInterval) {
}

/**
* Creates an instance of AzureDatabricks service API entry point.
* Creates an instance of Azure Databricks service API entry point.
*
* @param credential the credential to use.
* @param profile the Azure profile for client.
* @return the AzureDatabricks service API instance.
* @return the Azure Databricks service API instance.
*/
public AzureDatabricksManager authenticate(TokenCredential credential, AzureProfile profile) {
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.databricks")
.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 @@ -276,18 +282,6 @@ public AzureDatabricksManager authenticate(TokenCredential credential, AzureProf
}
}

/**
* Gets the resource collection API of Workspaces. It manages Workspace.
*
* @return Resource collection API of Workspaces.
*/
public Workspaces workspaces() {
if (this.workspaces == null) {
this.workspaces = new WorkspacesImpl(clientObject.getWorkspaces(), this);
}
return workspaces;
}

/**
* Gets the resource collection API of Operations.
*
Expand All @@ -301,15 +295,15 @@ public Operations operations() {
}

/**
* Gets the resource collection API of PrivateLinkResources.
* Gets the resource collection API of Workspaces. It manages Workspace.
*
* @return Resource collection API of PrivateLinkResources.
* @return Resource collection API of Workspaces.
*/
public PrivateLinkResources privateLinkResources() {
if (this.privateLinkResources == null) {
this.privateLinkResources = new PrivateLinkResourcesImpl(clientObject.getPrivateLinkResources(), this);
public Workspaces workspaces() {
if (this.workspaces == null) {
this.workspaces = new WorkspacesImpl(clientObject.getWorkspaces(), this);
}
return privateLinkResources;
return workspaces;
}

/**
Expand All @@ -325,6 +319,18 @@ public PrivateEndpointConnections privateEndpointConnections() {
return privateEndpointConnections;
}

/**
* Gets the resource collection API of AccessConnectors. It manages AccessConnector.
*
* @return Resource collection API of AccessConnectors.
*/
public AccessConnectors accessConnectors() {
if (this.accessConnectors == null) {
this.accessConnectors = new AccessConnectorsImpl(clientObject.getAccessConnectors(), this);
}
return accessConnectors;
}

/**
* Gets the resource collection API of OutboundNetworkDependenciesEndpoints.
*
Expand All @@ -339,27 +345,27 @@ public OutboundNetworkDependenciesEndpoints outboundNetworkDependenciesEndpoints
}

/**
* Gets the resource collection API of VNetPeerings. It manages VirtualNetworkPeering.
* Gets the resource collection API of PrivateLinkResources.
*
* @return Resource collection API of VNetPeerings.
* @return Resource collection API of PrivateLinkResources.
*/
public VNetPeerings vNetPeerings() {
if (this.vNetPeerings == null) {
this.vNetPeerings = new VNetPeeringsImpl(clientObject.getVNetPeerings(), this);
public PrivateLinkResources privateLinkResources() {
if (this.privateLinkResources == null) {
this.privateLinkResources = new PrivateLinkResourcesImpl(clientObject.getPrivateLinkResources(), this);
}
return vNetPeerings;
return privateLinkResources;
}

/**
* Gets the resource collection API of AccessConnectors. It manages AccessConnector.
* Gets the resource collection API of VNetPeerings. It manages VirtualNetworkPeering.
*
* @return Resource collection API of AccessConnectors.
* @return Resource collection API of VNetPeerings.
*/
public AccessConnectors accessConnectors() {
if (this.accessConnectors == null) {
this.accessConnectors = new AccessConnectorsImpl(clientObject.getAccessConnectors(), this);
public VNetPeerings vNetPeerings() {
if (this.vNetPeerings == null) {
this.vNetPeerings = new VNetPeeringsImpl(clientObject.getVNetPeerings(), this);
}
return accessConnectors;
return vNetPeerings;
}

/**
Expand Down
Loading
Loading