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 a98c4e66adc06ee998661165b31f5a669dae411e into 53ed59041775b47e32970efc8eea6dc7c3b5de05
  • Loading branch information
SDKAuto committed Dec 3, 2024
1 parent 098ec58 commit b4bcf52
Show file tree
Hide file tree
Showing 1,356 changed files with 6,071 additions and 40,238 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-03)

- 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
23 changes: 0 additions & 23 deletions sdk/datafactory/azure-resourcemanager-datafactory/SAMPLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@
- [GetByResourceGroup](#factories_getbyresourcegroup)
- [GetDataPlaneAccess](#factories_getdataplaneaccess)
- [GetGitHubAccessToken](#factories_getgithubaccesstoken)
- [List](#factories_list)
- [ListByResourceGroup](#factories_listbyresourcegroup)
- [Update](#factories_update)

Expand Down Expand Up @@ -1330,28 +1329,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
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 @@ -21,28 +21,6 @@
* An instance of this class provides access to all the operations defined in FactoriesClient.
*/
public interface FactoriesClient {
/**
* Lists factories under the specified subscription.
*
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return a list of factory resources as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<FactoryInner> list();

/**
* Lists factories under the specified subscription.
*
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return a list of factory resources as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<FactoryInner> list(Context context);

/**
* Updates a factory's repo information.
*
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 b4bcf52

Please sign in to comment.