Skip to content

Commit

Permalink
CodeGen from PR 3564 in test-repo-billy/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge 867328d523719e230928efab0fc24e54a8b8bc72 into 53ed59041775b47e32970efc8eea6dc7c3b5de05
  • Loading branch information
SDKAuto committed Dec 4, 2024
1 parent 098ec58 commit ddf62fd
Show file tree
Hide file tree
Showing 1,374 changed files with 6,089 additions and 42,439 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-12-04)

- 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
85 changes: 0 additions & 85 deletions sdk/datafactory/azure-resourcemanager-datafactory/SAMPLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,11 @@

## Factories

- [ConfigureFactoryRepo](#factories_configurefactoryrepo)
- [CreateOrUpdate](#factories_createorupdate)
- [Delete](#factories_delete)
- [GetByResourceGroup](#factories_getbyresourcegroup)
- [GetDataPlaneAccess](#factories_getdataplaneaccess)
- [GetGitHubAccessToken](#factories_getgithubaccesstoken)
- [List](#factories_list)
- [ListByResourceGroup](#factories_listbyresourcegroup)
- [Update](#factories_update)

Expand Down Expand Up @@ -121,10 +119,6 @@
- [Get](#managedvirtualnetworks_get)
- [ListByFactory](#managedvirtualnetworks_listbyfactory)

## Operations

- [List](#operations_list)

## PipelineRuns

- [Cancel](#pipelineruns_cancel)
Expand Down Expand Up @@ -1161,41 +1155,6 @@ public final class ExposureControlQueryFeatureValuesByFactorySamples {
}
```

### Factories_ConfigureFactoryRepo

```java
import com.azure.resourcemanager.datafactory.models.FactoryRepoUpdate;
import com.azure.resourcemanager.datafactory.models.FactoryVstsConfiguration;

/**
* Samples for Factories ConfigureFactoryRepo.
*/
public final class FactoriesConfigureFactoryRepoSamples {
/*
* x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/
* Factories_ConfigureFactoryRepo.json
*/
/**
* Sample code: Factories_ConfigureFactoryRepo.
*
* @param manager Entry point to DataFactoryManager.
*/
public static void factoriesConfigureFactoryRepo(com.azure.resourcemanager.datafactory.DataFactoryManager manager) {
manager.factories()
.configureFactoryRepoWithResponse("East US", new FactoryRepoUpdate().withFactoryResourceId(
"/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataFactory/factories/exampleFactoryName")
.withRepoConfiguration(new FactoryVstsConfiguration().withAccountName("ADF")
.withRepositoryName("repo")
.withCollaborationBranch("master")
.withRootFolder("/")
.withLastCommitId("")
.withProjectName("project")
.withTenantId("")),
com.azure.core.util.Context.NONE);
}
}
```

### Factories_CreateOrUpdate

```java
Expand Down Expand Up @@ -1330,28 +1289,6 @@ public final class FactoriesGetGitHubAccessTokenSamples {
}
```

### Factories_List

```java
/**
* Samples for Factories List.
*/
public final class FactoriesListSamples {
/*
* x-ms-original-file:
* specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Factories_List.json
*/
/**
* Sample code: Factories_List.
*
* @param manager Entry point to DataFactoryManager.
*/
public static void factoriesList(com.azure.resourcemanager.datafactory.DataFactoryManager manager) {
manager.factories().list(com.azure.core.util.Context.NONE);
}
}
```

### Factories_ListByResourceGroup

```java
Expand Down Expand Up @@ -2469,28 +2406,6 @@ public final class ManagedVirtualNetworksListByFactorySamples {
}
```

### Operations_List

```java
/**
* Samples for Operations List.
*/
public final class OperationsListSamples {
/*
* x-ms-original-file:
* specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Operations_List.json
*/
/**
* Sample code: Operations_List.
*
* @param manager Entry point to DataFactoryManager.
*/
public static void operationsList(com.azure.resourcemanager.datafactory.DataFactoryManager manager) {
manager.operations().list(com.azure.core.util.Context.NONE);
}
}
```

### PipelineRuns_Cancel

```java
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 @@ -40,11 +40,10 @@
import com.azure.resourcemanager.datafactory.implementation.LinkedServicesImpl;
import com.azure.resourcemanager.datafactory.implementation.ManagedPrivateEndpointsImpl;
import com.azure.resourcemanager.datafactory.implementation.ManagedVirtualNetworksImpl;
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 @@ -63,11 +62,10 @@
import com.azure.resourcemanager.datafactory.models.LinkedServices;
import com.azure.resourcemanager.datafactory.models.ManagedPrivateEndpoints;
import com.azure.resourcemanager.datafactory.models.ManagedVirtualNetworks;
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 All @@ -84,12 +82,10 @@
* V2 services.
*/
public final class DataFactoryManager {
private Operations operations;
private ExposureControls exposureControls;

private Factories factories;

private ExposureControls exposureControls;

private IntegrationRuntimes integrationRuntimes;

private IntegrationRuntimeObjectMetadatas integrationRuntimeObjectMetadatas;
Expand Down Expand Up @@ -294,7 +290,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 +323,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 All @@ -341,15 +337,15 @@ public DataFactoryManager authenticate(TokenCredential credential, AzureProfile
}

/**
* Gets the resource collection API of Operations.
* Gets the resource collection API of ExposureControls.
*
* @return Resource collection API of Operations.
* @return Resource collection API of ExposureControls.
*/
public Operations operations() {
if (this.operations == null) {
this.operations = new OperationsImpl(clientObject.getOperations(), this);
public ExposureControls exposureControls() {
if (this.exposureControls == null) {
this.exposureControls = new ExposureControlsImpl(clientObject.getExposureControls(), this);
}
return operations;
return exposureControls;
}

/**
Expand All @@ -364,18 +360,6 @@ public Factories factories() {
return factories;
}

/**
* Gets the resource collection API of ExposureControls.
*
* @return Resource collection API of ExposureControls.
*/
public ExposureControls exposureControls() {
if (this.exposureControls == null) {
this.exposureControls = new ExposureControlsImpl(clientObject.getExposureControls(), this);
}
return exposureControls;
}

/**
* Gets the resource collection API of IntegrationRuntimes. It manages IntegrationRuntimeResource.
*
Expand Down
Loading

0 comments on commit ddf62fd

Please sign in to comment.