Skip to content

Commit

Permalink
CodeGen from PR 31565 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge bb39a3d0c10a74510ac7863f5d81650a713b8876 into 60c67f112c66537f1d006bf1b497857ccd2afacd
  • Loading branch information
SDKAuto committed Nov 15, 2024
1 parent c9676d2 commit f4232e2
Show file tree
Hide file tree
Showing 1,345 changed files with 6,094 additions and 39,907 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Release History

## 1.0.0-beta.31 (Unreleased)
## 1.0.0-beta.1 (2024-11-15)

- Azure Resource Manager DataFactory client library for Java. This package contains Microsoft Azure SDK for DataFactory Management SDK. The Azure Data Factory V2 management API provides a RESTful set of web services that interact with Azure Data Factory V2 services. Package tag package-2018-06. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).

### Features Added

Expand Down
38 changes: 22 additions & 16 deletions sdk/datafactory/azure-resourcemanager-datafactory/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Various documentation is available to help you get started
<dependency>
<groupId>com.azure.resourcemanager</groupId>
<artifactId>azure-resourcemanager-datafactory</artifactId>
<version>1.0.0-beta.30</version>
<version>1.0.0-beta.31</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand Down Expand Up @@ -72,30 +72,33 @@ See [API design][design] for general introduction on design and key concepts on

```java
// storage account
StorageAccount storageAccount = storageManager.storageAccounts().define(STORAGE_ACCOUNT)
StorageAccount storageAccount = storageManager.storageAccounts()
.define(STORAGE_ACCOUNT)
.withRegion(REGION)
.withExistingResourceGroup(resourceGroup)
.create();
final String storageAccountKey = storageAccount.getKeys().iterator().next().value();
final String connectionString = getStorageConnectionString(STORAGE_ACCOUNT, storageAccountKey, storageManager.environment());
final String connectionString
= getStorageConnectionString(STORAGE_ACCOUNT, storageAccountKey, storageManager.environment());

// container
final String containerName = "adf";
storageManager.blobContainers().defineContainer(containerName)
storageManager.blobContainers()
.defineContainer(containerName)
.withExistingStorageAccount(resourceGroup, STORAGE_ACCOUNT)
.withPublicAccess(PublicAccess.NONE)
.create();

// blob as input
BlobClient blobClient = new BlobClientBuilder()
.connectionString(connectionString)
BlobClient blobClient = new BlobClientBuilder().connectionString(connectionString)
.containerName(containerName)
.blobName("input/data.txt")
.buildClient();
blobClient.upload(BinaryData.fromString("data"));

// data factory
Factory dataFactory = manager.factories().define(DATA_FACTORY)
Factory dataFactory = manager.factories()
.define(DATA_FACTORY)
.withRegion(REGION)
.withExistingResourceGroup(resourceGroup)
.create();
Expand All @@ -106,15 +109,16 @@ connectionStringProperty.put("type", "SecureString");
connectionStringProperty.put("value", connectionString);

final String linkedServiceName = "LinkedService";
manager.linkedServices().define(linkedServiceName)
manager.linkedServices()
.define(linkedServiceName)
.withExistingFactory(resourceGroup, DATA_FACTORY)
.withProperties(new AzureStorageLinkedService()
.withConnectionString(connectionStringProperty))
.withProperties(new AzureStorageLinkedService().withConnectionString(connectionStringProperty))
.create();

// input dataset
final String inputDatasetName = "InputDataset";
manager.datasets().define(inputDatasetName)
manager.datasets()
.define(inputDatasetName)
.withExistingFactory(resourceGroup, DATA_FACTORY)
.withProperties(new AzureBlobDataset()
.withLinkedServiceName(new LinkedServiceReference().withReferenceName(linkedServiceName))
Expand All @@ -125,7 +129,8 @@ manager.datasets().define(inputDatasetName)

// output dataset
final String outputDatasetName = "OutputDataset";
manager.datasets().define(outputDatasetName)
manager.datasets()
.define(outputDatasetName)
.withExistingFactory(resourceGroup, DATA_FACTORY)
.withProperties(new AzureBlobDataset()
.withLinkedServiceName(new LinkedServiceReference().withReferenceName(linkedServiceName))
Expand All @@ -135,14 +140,15 @@ manager.datasets().define(outputDatasetName)
.create();

// pipeline
PipelineResource pipeline = manager.pipelines().define("CopyBlobPipeline")
PipelineResource pipeline = manager.pipelines()
.define("CopyBlobPipeline")
.withExistingFactory(resourceGroup, DATA_FACTORY)
.withActivities(Collections.singletonList(new CopyActivity()
.withName("CopyBlob")
.withActivities(Collections.singletonList(new CopyActivity().withName("CopyBlob")
.withSource(new BlobSource())
.withSink(new BlobSink())
.withInputs(Collections.singletonList(new DatasetReference().withReferenceName(inputDatasetName)))
.withOutputs(Collections.singletonList(new DatasetReference().withReferenceName(outputDatasetName)))))
.withOutputs(
Collections.singletonList(new DatasetReference().withReferenceName(outputDatasetName)))))
.create();

// run pipeline
Expand Down
11 changes: 6 additions & 5 deletions sdk/datafactory/azure-resourcemanager-datafactory/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,9 @@
<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.3.0</version> <!-- {x-version-update;com.azure:azure-json;dependency} -->
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-core</artifactId>
Expand All @@ -63,6 +59,11 @@
<artifactId>azure-core-management</artifactId>
<version>1.15.6</version> <!-- {x-version-update;com.azure:azure-core-management;dependency} -->
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-json</artifactId>
<version>1.3.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,15 +11,15 @@
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.logging.ClientLogger;
Expand All @@ -43,8 +43,8 @@
import com.azure.resourcemanager.datafactory.implementation.OperationsImpl;
import com.azure.resourcemanager.datafactory.implementation.PipelineRunsImpl;
import com.azure.resourcemanager.datafactory.implementation.PipelinesImpl;
import com.azure.resourcemanager.datafactory.implementation.PrivateEndpointConnectionOperationsImpl;
import com.azure.resourcemanager.datafactory.implementation.PrivateEndPointConnectionsImpl;
import com.azure.resourcemanager.datafactory.implementation.PrivateEndpointConnectionOperationsImpl;
import com.azure.resourcemanager.datafactory.implementation.PrivateLinkResourcesImpl;
import com.azure.resourcemanager.datafactory.implementation.TriggerRunsImpl;
import com.azure.resourcemanager.datafactory.implementation.TriggersImpl;
Expand All @@ -66,8 +66,8 @@
import com.azure.resourcemanager.datafactory.models.Operations;
import com.azure.resourcemanager.datafactory.models.PipelineRuns;
import com.azure.resourcemanager.datafactory.models.Pipelines;
import com.azure.resourcemanager.datafactory.models.PrivateEndpointConnectionOperations;
import com.azure.resourcemanager.datafactory.models.PrivateEndPointConnections;
import com.azure.resourcemanager.datafactory.models.PrivateEndpointConnectionOperations;
import com.azure.resourcemanager.datafactory.models.PrivateLinkResources;
import com.azure.resourcemanager.datafactory.models.TriggerRuns;
import com.azure.resourcemanager.datafactory.models.Triggers;
Expand Down Expand Up @@ -294,7 +294,7 @@ public DataFactoryManager authenticate(TokenCredential credential, AzureProfile
.append("-")
.append("com.azure.resourcemanager.datafactory")
.append("/")
.append("1.0.0-beta.30");
.append("1.0.0-beta.1");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder.append(" (")
.append(Configuration.getGlobalConfiguration().get("java.version"))
Expand Down Expand Up @@ -327,7 +327,7 @@ public DataFactoryManager authenticate(TokenCredential credential, AzureProfile
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
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,6 @@ public AmazonRdsForSqlServerLinkedServiceTypeProperties withPooling(Object pooli
*/
@Override
public void validate() {
super.validate();
if (password() != null) {
password().validate();
}
Expand Down
Loading

0 comments on commit f4232e2

Please sign in to comment.