Skip to content
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import com.azure.core.util.logging.ClientLogger;
import com.azure.monitor.ingestion.implementation.IngestionUsingDataCollectionRulesClientBuilder;
import com.azure.monitor.ingestion.implementation.IngestionUsingDataCollectionRulesServiceVersion;
import com.azure.monitor.ingestion.models.LogsIngestionAudience;

import java.net.MalformedURLException;
import java.net.URL;
Expand Down Expand Up @@ -171,6 +172,19 @@ public LogsIngestionClientBuilder credential(TokenCredential tokenCredential) {
return this;
}


/**
* Sets the audience for the authorization scope of log ingestion clients. If this value is not set, the default
* audience will be the azure public cloud.
*
* @param audience the audience value.
* @return the updated {@link LogsIngestionClientBuilder}.
*/
public LogsIngestionClientBuilder audience(LogsIngestionAudience audience) {
innerLogBuilder.audience(audience);
return this;
}

/**
* {@inheritDoc}
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,17 @@
import com.azure.core.util.BinaryData;
import reactor.core.publisher.Mono;

/** Initializes a new instance of the asynchronous IngestionUsingDataCollectionRulesClient type. */
/**
* Initializes a new instance of the asynchronous IngestionUsingDataCollectionRulesClient type.
*/
@ServiceClient(builder = IngestionUsingDataCollectionRulesClientBuilder.class, isAsync = true)
public final class IngestionUsingDataCollectionRulesAsyncClient {
@Generated private final IngestionUsingDataCollectionRulesClientImpl serviceClient;
@Generated
private final IngestionUsingDataCollectionRulesClientImpl serviceClient;

/**
* Initializes an instance of IngestionUsingDataCollectionRulesAsyncClient class.
*
*
* @param serviceClient the service client implementation.
*/
@Generated
Expand All @@ -34,28 +37,23 @@ public final class IngestionUsingDataCollectionRulesAsyncClient {

/**
* Ingestion API used to directly ingest data using Data Collection Rules
*
* <p>See error response code and error response message for more detail.
*
* <p><strong>Header Parameters</strong>
*
*
* See error response code and error response message for more detail.
* <p><strong>Header Parameters</strong></p>
* <table border="1">
* <caption>Header Parameters</caption>
* <tr><th>Name</th><th>Type</th><th>Required</th><th>Description</th></tr>
* <tr><td>Content-Encoding</td><td>String</td><td>No</td><td>gzip</td></tr>
* <tr><td>x-ms-client-request-id</td><td>String</td><td>No</td><td>Client request Id</td></tr>
* </table>
*
* You can add these to a request with {@link RequestOptions#addHeader}
*
* <p><strong>Request Body Schema</strong>
*
* <p><strong>Request Body Schema</strong></p>
* <pre>{@code
* [
* Object (Required)
* ]
* }</pre>
*
*
* @param ruleId The immutable Id of the Data Collection Rule resource.
* @param stream The streamDeclaration name as defined in the Data Collection Rule.
* @param body An array of objects matching the schema defined by the provided stream.
Expand All @@ -68,8 +66,8 @@ public final class IngestionUsingDataCollectionRulesAsyncClient {
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<Response<Void>> uploadWithResponse(
String ruleId, String stream, BinaryData body, RequestOptions requestOptions) {
public Mono<Response<Void>> uploadWithResponse(String ruleId, String stream, BinaryData body,
RequestOptions requestOptions) {
return this.serviceClient.uploadWithResponseAsync(ruleId, stream, body, requestOptions);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,45 +16,43 @@
import com.azure.core.http.rest.Response;
import com.azure.core.util.BinaryData;

/** Initializes a new instance of the synchronous IngestionUsingDataCollectionRulesClient type. */
/**
* Initializes a new instance of the synchronous IngestionUsingDataCollectionRulesClient type.
*/
@ServiceClient(builder = IngestionUsingDataCollectionRulesClientBuilder.class)
public final class IngestionUsingDataCollectionRulesClient {
@Generated private final IngestionUsingDataCollectionRulesClientImpl serviceClient;
@Generated
private final IngestionUsingDataCollectionRulesClientImpl serviceClient;

/**
* Initializes an instance of IngestionUsingDataCollectionRulesClient class.
*
* @param client the async client.
*
* @param serviceClient the service client implementation.
*/
@Generated
IngestionUsingDataCollectionRulesClient(IngestionUsingDataCollectionRulesClientImpl client) {
this.serviceClient = client;
IngestionUsingDataCollectionRulesClient(IngestionUsingDataCollectionRulesClientImpl serviceClient) {
this.serviceClient = serviceClient;
}

/**
* Ingestion API used to directly ingest data using Data Collection Rules
*
* <p>See error response code and error response message for more detail.
*
* <p><strong>Header Parameters</strong>
*
*
* See error response code and error response message for more detail.
* <p><strong>Header Parameters</strong></p>
* <table border="1">
* <caption>Header Parameters</caption>
* <tr><th>Name</th><th>Type</th><th>Required</th><th>Description</th></tr>
* <tr><td>Content-Encoding</td><td>String</td><td>No</td><td>gzip</td></tr>
* <tr><td>x-ms-client-request-id</td><td>String</td><td>No</td><td>Client request Id</td></tr>
* </table>
*
* You can add these to a request with {@link RequestOptions#addHeader}
*
* <p><strong>Request Body Schema</strong>
*
* <p><strong>Request Body Schema</strong></p>
* <pre>{@code
* [
* Object (Required)
* ]
* }</pre>
*
*
* @param ruleId The immutable Id of the Data Collection Rule resource.
* @param stream The streamDeclaration name as defined in the Data Collection Rule.
* @param body An array of objects matching the schema defined by the provided stream.
Expand All @@ -67,8 +65,8 @@ public final class IngestionUsingDataCollectionRulesClient {
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
public Response<Void> uploadWithResponse(
String ruleId, String stream, BinaryData body, RequestOptions requestOptions) {
public Response<Void> uploadWithResponse(String ruleId, String stream, BinaryData body,
RequestOptions requestOptions) {
return this.serviceClient.uploadWithResponse(ruleId, stream, body, requestOptions);
}
}
Loading