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
  •  
  •  
  •  
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Release History

## 1.0.0-beta.30 (Unreleased)
## 1.0.0-beta.1 (2024-07-22)

- 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
13 changes: 5 additions & 8 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.29</version>
<version>1.0.0-beta.30</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand All @@ -45,15 +45,11 @@ Azure Management Libraries require a `TokenCredential` implementation for authen

### Authentication

By default, Microsoft Entra ID token authentication depends on correct configuration of the following environment variables.
Microsoft Entra ID token authentication relies on the [credential class][azure_identity_credentials] from [Azure Identity][azure_identity] package.

- `AZURE_CLIENT_ID` for Azure client ID.
- `AZURE_TENANT_ID` for Azure tenant ID.
- `AZURE_CLIENT_SECRET` or `AZURE_CLIENT_CERTIFICATE_PATH` for client secret or client certificate.
Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment variable.

In addition, Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment variable.

With above configuration, `azure` client can be authenticated using the following code:
Assuming the use of the `DefaultAzureCredential` credential class, the client can be authenticated using the following code:

```java
AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE);
Expand Down Expand Up @@ -184,6 +180,7 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m
[jdk]: https://learn.microsoft.com/azure/developer/java/fundamentals/
[azure_subscription]: https://azure.microsoft.com/free/
[azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity
[azure_identity_credentials]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/identity/azure-identity#credentials
[azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty
[authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/AUTH.md
[design]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/DESIGN.md
Expand Down
5 changes: 5 additions & 0 deletions sdk/datafactory/azure-resourcemanager-datafactory/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@
<revapi.skip>true</revapi.skip>
</properties>
<dependencies>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-json</artifactId>
<version>1.1.0</version> <!-- {x-version-update;com.azure:azure-json;dependency} -->
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-core</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ public DataFactoryManager authenticate(TokenCredential credential, AzureProfile
.append("-")
.append("com.azure.resourcemanager.datafactory")
.append("/")
.append("1.0.0-beta.29");
.append("1.0.0-beta.1");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder.append(" (")
.append(Configuration.getGlobalConfiguration().get("java.version"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,31 @@
package com.azure.resourcemanager.datafactory.fluent.models;

import com.azure.core.annotation.Fluent;
import com.azure.json.JsonReader;
import com.azure.json.JsonSerializable;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
import com.azure.resourcemanager.datafactory.models.UserAccessPolicy;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.io.IOException;

/**
* Get Data Plane read only token response definition.
*/
@Fluent
public final class AccessPolicyResponseInner {
public final class AccessPolicyResponseInner implements JsonSerializable<AccessPolicyResponseInner> {
/*
* The user access policy.
*/
@JsonProperty(value = "policy")
private UserAccessPolicy policy;

/*
* Data Plane read only access token.
*/
@JsonProperty(value = "accessToken")
private String accessToken;

/*
* Data Plane service base URL.
*/
@JsonProperty(value = "dataPlaneUrl")
private String dataPlaneUrl;

/**
Expand Down Expand Up @@ -107,4 +108,46 @@ public void validate() {
policy().validate();
}
}

/**
* {@inheritDoc}
*/
@Override
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
jsonWriter.writeJsonField("policy", this.policy);
jsonWriter.writeStringField("accessToken", this.accessToken);
jsonWriter.writeStringField("dataPlaneUrl", this.dataPlaneUrl);
return jsonWriter.writeEndObject();
}

/**
* Reads an instance of AccessPolicyResponseInner from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of AccessPolicyResponseInner if the JsonReader was pointing to an instance of it, or null if
* it was pointing to JSON null.
* @throws IOException If an error occurs while reading the AccessPolicyResponseInner.
*/
public static AccessPolicyResponseInner fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
AccessPolicyResponseInner deserializedAccessPolicyResponseInner = new AccessPolicyResponseInner();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();

if ("policy".equals(fieldName)) {
deserializedAccessPolicyResponseInner.policy = UserAccessPolicy.fromJson(reader);
} else if ("accessToken".equals(fieldName)) {
deserializedAccessPolicyResponseInner.accessToken = reader.getString();
} else if ("dataPlaneUrl".equals(fieldName)) {
deserializedAccessPolicyResponseInner.dataPlaneUrl = reader.getString();
} else {
reader.skipChildren();
}
}

return deserializedAccessPolicyResponseInner;
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,27 @@

import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
import com.azure.json.JsonReader;
import com.azure.json.JsonSerializable;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
import com.azure.resourcemanager.datafactory.models.ActivityRun;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.io.IOException;
import java.util.List;

/**
* A list activity runs.
*/
@Fluent
public final class ActivityRunsQueryResponseInner {
public final class ActivityRunsQueryResponseInner implements JsonSerializable<ActivityRunsQueryResponseInner> {
/*
* List of activity runs.
*/
@JsonProperty(value = "value", required = true)
private List<ActivityRun> value;

/*
* The continuation token for getting the next page of results, if any remaining results exist, null otherwise.
*/
@JsonProperty(value = "continuationToken")
private String continuationToken;

/**
Expand Down Expand Up @@ -91,4 +93,46 @@ public void validate() {
}

private static final ClientLogger LOGGER = new ClientLogger(ActivityRunsQueryResponseInner.class);

/**
* {@inheritDoc}
*/
@Override
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element));
jsonWriter.writeStringField("continuationToken", this.continuationToken);
return jsonWriter.writeEndObject();
}

/**
* Reads an instance of ActivityRunsQueryResponseInner from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of ActivityRunsQueryResponseInner if the JsonReader was pointing to an instance of it, or
* null if it was pointing to JSON null.
* @throws IllegalStateException If the deserialized JSON object was missing any required properties.
* @throws IOException If an error occurs while reading the ActivityRunsQueryResponseInner.
*/
public static ActivityRunsQueryResponseInner fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
ActivityRunsQueryResponseInner deserializedActivityRunsQueryResponseInner
= new ActivityRunsQueryResponseInner();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();

if ("value".equals(fieldName)) {
List<ActivityRun> value = reader.readArray(reader1 -> ActivityRun.fromJson(reader1));
deserializedActivityRunsQueryResponseInner.value = value;
} else if ("continuationToken".equals(fieldName)) {
deserializedActivityRunsQueryResponseInner.continuationToken = reader.getString();
} else {
reader.skipChildren();
}
}

return deserializedActivityRunsQueryResponseInner;
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,21 @@
package com.azure.resourcemanager.datafactory.fluent.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.azure.json.JsonReader;
import com.azure.json.JsonSerializable;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
import java.io.IOException;

/**
* Response body structure for starting data flow debug session.
*/
@Fluent
public final class AddDataFlowToDebugSessionResponseInner {
public final class AddDataFlowToDebugSessionResponseInner
implements JsonSerializable<AddDataFlowToDebugSessionResponseInner> {
/*
* The ID of data flow debug job version.
*/
@JsonProperty(value = "jobVersion")
private String jobVersion;

/**
Expand Down Expand Up @@ -51,4 +55,41 @@ public AddDataFlowToDebugSessionResponseInner withJobVersion(String jobVersion)
*/
public void validate() {
}

/**
* {@inheritDoc}
*/
@Override
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
jsonWriter.writeStringField("jobVersion", this.jobVersion);
return jsonWriter.writeEndObject();
}

/**
* Reads an instance of AddDataFlowToDebugSessionResponseInner from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of AddDataFlowToDebugSessionResponseInner if the JsonReader was pointing to an instance of
* it, or null if it was pointing to JSON null.
* @throws IOException If an error occurs while reading the AddDataFlowToDebugSessionResponseInner.
*/
public static AddDataFlowToDebugSessionResponseInner fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
AddDataFlowToDebugSessionResponseInner deserializedAddDataFlowToDebugSessionResponseInner
= new AddDataFlowToDebugSessionResponseInner();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();

if ("jobVersion".equals(fieldName)) {
deserializedAddDataFlowToDebugSessionResponseInner.jobVersion = reader.getString();
} else {
reader.skipChildren();
}
}

return deserializedAddDataFlowToDebugSessionResponseInner;
});
}
}
Loading