Class DataCollectionRule
java.lang.Object
com.azure.resourcemanager.monitor.models.DataCollectionRule
- All Implemented Interfaces:
com.azure.json.JsonSerializable<DataCollectionRule>
- Direct Known Subclasses:
DataCollectionRuleResourceProperties
public class DataCollectionRule
extends Object
implements com.azure.json.JsonSerializable<DataCollectionRule>
Definition of what monitoring data to collect and where that data should be sent.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the dataCollectionEndpointId property: The resource ID of the data collection endpoint that this rule can be used with.Get the dataFlows property: The specification of data flows.Get the dataSources property: The specification of data sources.Get the description property: Description of the data collection rule.Get the destinations property: The specification of destinations.static DataCollectionRule
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of DataCollectionRule from the JsonReader.Get the immutableId property: The immutable ID of this data collection rule.metadata()
Get the metadata property: Metadata about the resource.Get the provisioningState property: The resource provisioning state.Get the streamDeclarations property: Declaration of custom streams used in this rule.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) void
validate()
Validates the instance.withDataCollectionEndpointId
(String dataCollectionEndpointId) Set the dataCollectionEndpointId property: The resource ID of the data collection endpoint that this rule can be used with.withDataFlows
(List<DataFlow> dataFlows) Set the dataFlows property: The specification of data flows.withDataSources
(DataCollectionRuleDataSources dataSources) Set the dataSources property: The specification of data sources.withDescription
(String description) Set the description property: Description of the data collection rule.withDestinations
(DataCollectionRuleDestinations destinations) Set the destinations property: The specification of destinations.withStreamDeclarations
(Map<String, StreamDeclaration> streamDeclarations) Set the streamDeclarations property: Declaration of custom streams used in this rule.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
DataCollectionRule
public DataCollectionRule()Creates an instance of DataCollectionRule class.
-
-
Method Details
-
description
Get the description property: Description of the data collection rule.- Returns:
- the description value.
-
withDescription
Set the description property: Description of the data collection rule.- Parameters:
description
- the description value to set.- Returns:
- the DataCollectionRule object itself.
-
immutableId
Get the immutableId property: The immutable ID of this data collection rule. This property is READ-ONLY.- Returns:
- the immutableId value.
-
dataCollectionEndpointId
Get the dataCollectionEndpointId property: The resource ID of the data collection endpoint that this rule can be used with.- Returns:
- the dataCollectionEndpointId value.
-
withDataCollectionEndpointId
Set the dataCollectionEndpointId property: The resource ID of the data collection endpoint that this rule can be used with.- Parameters:
dataCollectionEndpointId
- the dataCollectionEndpointId value to set.- Returns:
- the DataCollectionRule object itself.
-
metadata
Get the metadata property: Metadata about the resource.- Returns:
- the metadata value.
-
streamDeclarations
Get the streamDeclarations property: Declaration of custom streams used in this rule.- Returns:
- the streamDeclarations value.
-
withStreamDeclarations
Set the streamDeclarations property: Declaration of custom streams used in this rule.- Parameters:
streamDeclarations
- the streamDeclarations value to set.- Returns:
- the DataCollectionRule object itself.
-
dataSources
Get the dataSources property: The specification of data sources. This property is optional and can be omitted if the rule is meant to be used via direct calls to the provisioned endpoint.- Returns:
- the dataSources value.
-
withDataSources
Set the dataSources property: The specification of data sources. This property is optional and can be omitted if the rule is meant to be used via direct calls to the provisioned endpoint.- Parameters:
dataSources
- the dataSources value to set.- Returns:
- the DataCollectionRule object itself.
-
destinations
Get the destinations property: The specification of destinations.- Returns:
- the destinations value.
-
withDestinations
Set the destinations property: The specification of destinations.- Parameters:
destinations
- the destinations value to set.- Returns:
- the DataCollectionRule object itself.
-
dataFlows
Get the dataFlows property: The specification of data flows.- Returns:
- the dataFlows value.
-
withDataFlows
Set the dataFlows property: The specification of data flows.- Parameters:
dataFlows
- the dataFlows value to set.- Returns:
- the DataCollectionRule object itself.
-
provisioningState
Get the provisioningState property: The resource provisioning state.- Returns:
- the provisioningState value.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException
- thrown if the instance is not valid.
-
toJson
- Specified by:
toJson
in interfacecom.azure.json.JsonSerializable<DataCollectionRule>
- Throws:
IOException
-
fromJson
Reads an instance of DataCollectionRule from the JsonReader.- Parameters:
jsonReader
- The JsonReader being read.- Returns:
- An instance of DataCollectionRule 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 DataCollectionRule.
-