Skip to content

Commit 10d323b

Browse files
jairmyreesrnagar
andauthored
Autorest Regen to update scope to include non-public clouds (Azure#39224)
* Autorest Regen to update scope to include non-public cloud. * Restoring module-info.java * Updating the README.md * Adding `audience` to the Public API via an autorest code-customization * Adding javadoc comments to LogIngestionAudience * Changing method casing * Update sdk/monitor/azure-monitor-ingestion/src/main/java/com/azure/monitor/ingestion/models/LogIngestionAudience.java Co-authored-by: Srikanta <[email protected]> * Update sdk/monitor/azure-monitor-ingestion/src/main/java/com/azure/monitor/ingestion/models/LogIngestionAudience.java Co-authored-by: Srikanta <[email protected]> * Update sdk/monitor/azure-monitor-ingestion/src/main/java/com/azure/monitor/ingestion/models/LogIngestionAudience.java Co-authored-by: Srikanta <[email protected]> * Updates to PR based on comments * Updates to PR based on comments * Updates to PR based on comments * Updates to PR based on comments * Revert module-info.java * Javadoc update * Javadoc update * Javadoc update * Javadoc update * Updates to CHANGELOG.md --------- Co-authored-by: Srikanta <[email protected]>
1 parent f512c9c commit 10d323b

13 files changed

+508
-247
lines changed

sdk/monitor/azure-monitor-ingestion/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44

55
### Features Added
66

7+
- Introduced `LogsIngestionAudience` to allow specification of the audience of logs ingestion clients.
8+
- Support for the scopes of non-public clouds.
9+
710
### Breaking Changes
811

912
### Bugs Fixed

sdk/monitor/azure-monitor-ingestion/src/main/java/com/azure/monitor/ingestion/LogsIngestionClientBuilder.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import com.azure.core.util.logging.ClientLogger;
2121
import com.azure.monitor.ingestion.implementation.IngestionUsingDataCollectionRulesClientBuilder;
2222
import com.azure.monitor.ingestion.implementation.IngestionUsingDataCollectionRulesServiceVersion;
23+
import com.azure.monitor.ingestion.models.LogsIngestionAudience;
2324

2425
import java.net.MalformedURLException;
2526
import java.net.URL;
@@ -171,6 +172,19 @@ public LogsIngestionClientBuilder credential(TokenCredential tokenCredential) {
171172
return this;
172173
}
173174

175+
176+
/**
177+
* Sets the audience for the authorization scope of log ingestion clients. If this value is not set, the default
178+
* audience will be the azure public cloud.
179+
*
180+
* @param audience the audience value.
181+
* @return the updated {@link LogsIngestionClientBuilder}.
182+
*/
183+
public LogsIngestionClientBuilder audience(LogsIngestionAudience audience) {
184+
innerLogBuilder.audience(audience);
185+
return this;
186+
}
187+
174188
/**
175189
* {@inheritDoc}
176190
*/

sdk/monitor/azure-monitor-ingestion/src/main/java/com/azure/monitor/ingestion/implementation/IngestionUsingDataCollectionRulesAsyncClient.java

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,17 @@
1717
import com.azure.core.util.BinaryData;
1818
import reactor.core.publisher.Mono;
1919

20-
/** Initializes a new instance of the asynchronous IngestionUsingDataCollectionRulesClient type. */
20+
/**
21+
* Initializes a new instance of the asynchronous IngestionUsingDataCollectionRulesClient type.
22+
*/
2123
@ServiceClient(builder = IngestionUsingDataCollectionRulesClientBuilder.class, isAsync = true)
2224
public final class IngestionUsingDataCollectionRulesAsyncClient {
23-
@Generated private final IngestionUsingDataCollectionRulesClientImpl serviceClient;
25+
@Generated
26+
private final IngestionUsingDataCollectionRulesClientImpl serviceClient;
2427

2528
/**
2629
* Initializes an instance of IngestionUsingDataCollectionRulesAsyncClient class.
27-
*
30+
*
2831
* @param serviceClient the service client implementation.
2932
*/
3033
@Generated
@@ -34,28 +37,23 @@ public final class IngestionUsingDataCollectionRulesAsyncClient {
3437

3538
/**
3639
* Ingestion API used to directly ingest data using Data Collection Rules
37-
*
38-
* <p>See error response code and error response message for more detail.
39-
*
40-
* <p><strong>Header Parameters</strong>
41-
*
40+
*
41+
* See error response code and error response message for more detail.
42+
* <p><strong>Header Parameters</strong></p>
4243
* <table border="1">
4344
* <caption>Header Parameters</caption>
4445
* <tr><th>Name</th><th>Type</th><th>Required</th><th>Description</th></tr>
4546
* <tr><td>Content-Encoding</td><td>String</td><td>No</td><td>gzip</td></tr>
4647
* <tr><td>x-ms-client-request-id</td><td>String</td><td>No</td><td>Client request Id</td></tr>
4748
* </table>
48-
*
4949
* You can add these to a request with {@link RequestOptions#addHeader}
50-
*
51-
* <p><strong>Request Body Schema</strong>
52-
*
50+
* <p><strong>Request Body Schema</strong></p>
5351
* <pre>{@code
5452
* [
5553
* Object (Required)
5654
* ]
5755
* }</pre>
58-
*
56+
*
5957
* @param ruleId The immutable Id of the Data Collection Rule resource.
6058
* @param stream The streamDeclaration name as defined in the Data Collection Rule.
6159
* @param body An array of objects matching the schema defined by the provided stream.
@@ -68,8 +66,8 @@ public final class IngestionUsingDataCollectionRulesAsyncClient {
6866
*/
6967
@Generated
7068
@ServiceMethod(returns = ReturnType.SINGLE)
71-
public Mono<Response<Void>> uploadWithResponse(
72-
String ruleId, String stream, BinaryData body, RequestOptions requestOptions) {
69+
public Mono<Response<Void>> uploadWithResponse(String ruleId, String stream, BinaryData body,
70+
RequestOptions requestOptions) {
7371
return this.serviceClient.uploadWithResponseAsync(ruleId, stream, body, requestOptions);
7472
}
7573
}

sdk/monitor/azure-monitor-ingestion/src/main/java/com/azure/monitor/ingestion/implementation/IngestionUsingDataCollectionRulesClient.java

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -16,45 +16,43 @@
1616
import com.azure.core.http.rest.Response;
1717
import com.azure.core.util.BinaryData;
1818

19-
/** Initializes a new instance of the synchronous IngestionUsingDataCollectionRulesClient type. */
19+
/**
20+
* Initializes a new instance of the synchronous IngestionUsingDataCollectionRulesClient type.
21+
*/
2022
@ServiceClient(builder = IngestionUsingDataCollectionRulesClientBuilder.class)
2123
public final class IngestionUsingDataCollectionRulesClient {
22-
@Generated private final IngestionUsingDataCollectionRulesClientImpl serviceClient;
24+
@Generated
25+
private final IngestionUsingDataCollectionRulesClientImpl serviceClient;
2326

2427
/**
2528
* Initializes an instance of IngestionUsingDataCollectionRulesClient class.
26-
*
27-
* @param client the async client.
29+
*
30+
* @param serviceClient the service client implementation.
2831
*/
2932
@Generated
30-
IngestionUsingDataCollectionRulesClient(IngestionUsingDataCollectionRulesClientImpl client) {
31-
this.serviceClient = client;
33+
IngestionUsingDataCollectionRulesClient(IngestionUsingDataCollectionRulesClientImpl serviceClient) {
34+
this.serviceClient = serviceClient;
3235
}
3336

3437
/**
3538
* Ingestion API used to directly ingest data using Data Collection Rules
36-
*
37-
* <p>See error response code and error response message for more detail.
38-
*
39-
* <p><strong>Header Parameters</strong>
40-
*
39+
*
40+
* See error response code and error response message for more detail.
41+
* <p><strong>Header Parameters</strong></p>
4142
* <table border="1">
4243
* <caption>Header Parameters</caption>
4344
* <tr><th>Name</th><th>Type</th><th>Required</th><th>Description</th></tr>
4445
* <tr><td>Content-Encoding</td><td>String</td><td>No</td><td>gzip</td></tr>
4546
* <tr><td>x-ms-client-request-id</td><td>String</td><td>No</td><td>Client request Id</td></tr>
4647
* </table>
47-
*
4848
* You can add these to a request with {@link RequestOptions#addHeader}
49-
*
50-
* <p><strong>Request Body Schema</strong>
51-
*
49+
* <p><strong>Request Body Schema</strong></p>
5250
* <pre>{@code
5351
* [
5452
* Object (Required)
5553
* ]
5654
* }</pre>
57-
*
55+
*
5856
* @param ruleId The immutable Id of the Data Collection Rule resource.
5957
* @param stream The streamDeclaration name as defined in the Data Collection Rule.
6058
* @param body An array of objects matching the schema defined by the provided stream.
@@ -67,8 +65,8 @@ public final class IngestionUsingDataCollectionRulesClient {
6765
*/
6866
@Generated
6967
@ServiceMethod(returns = ReturnType.SINGLE)
70-
public Response<Void> uploadWithResponse(
71-
String ruleId, String stream, BinaryData body, RequestOptions requestOptions) {
68+
public Response<Void> uploadWithResponse(String ruleId, String stream, BinaryData body,
69+
RequestOptions requestOptions) {
7270
return this.serviceClient.uploadWithResponse(ruleId, stream, body, requestOptions);
7371
}
7472
}

0 commit comments

Comments
 (0)