Package com.pulumi.azurenative.network
Class FlowLog
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.azurenative.network.FlowLog
-
public class FlowLog extends com.pulumi.resources.CustomResource
A flow log resource. Azure REST API version: 2023-02-01. Prior API version in Azure Native 1.x: 2020-11-01. Other available API versions: 2023-04-01, 2023-05-01, 2023-06-01, 2023-09-01. ## Example Usage ### Create or update flow log ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.azurenative.network.FlowLog; import com.pulumi.azurenative.network.FlowLogArgs; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.io.File; import java.nio.file.Files; import java.nio.file.Paths; public class App { public static void main(String[] args) { Pulumi.run(App::stack); } public static void stack(Context ctx) { var flowLog = new FlowLog("flowLog", FlowLogArgs.builder() .enabled(true) .flowLogName("fl") .format(Map.ofEntries( Map.entry("type", "JSON"), Map.entry("version", 1) )) .location("centraluseuap") .networkWatcherName("nw1") .resourceGroupName("rg1") .storageId("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Storage/storageAccounts/nwtest1mgvbfmqsigdxe") .targetResourceId("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityGroups/desmondcentral-nsg") .build()); } } ``` ## Import An existing resource can be imported using its type token, name, and identifier, e.g. ```sh $ pulumi import azure-native:network:FlowLog Microsoft.Networkdesmond-rgdesmondcentral-nsg /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/flowLogs/{flowLogName} ```
-
-
Constructor Summary
Constructors Constructor Description FlowLog(java.lang.String name)
FlowLog(java.lang.String name, FlowLogArgs args)
FlowLog(java.lang.String name, FlowLogArgs args, com.pulumi.resources.CustomResourceOptions options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>>
enabled()
com.pulumi.core.Output<java.lang.String>
etag()
com.pulumi.core.Output<java.util.Optional<TrafficAnalyticsPropertiesResponse>>
flowAnalyticsConfiguration()
com.pulumi.core.Output<java.util.Optional<FlowLogFormatParametersResponse>>
format()
static FlowLog
get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.com.pulumi.core.Output<java.util.Optional<java.lang.String>>
location()
com.pulumi.core.Output<java.lang.String>
name()
com.pulumi.core.Output<java.lang.String>
provisioningState()
com.pulumi.core.Output<java.util.Optional<RetentionPolicyParametersResponse>>
retentionPolicy()
com.pulumi.core.Output<java.lang.String>
storageId()
com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,java.lang.String>>>
tags()
com.pulumi.core.Output<java.lang.String>
targetResourceGuid()
com.pulumi.core.Output<java.lang.String>
targetResourceId()
com.pulumi.core.Output<java.lang.String>
type()
-
-
-
Constructor Detail
-
FlowLog
public FlowLog(java.lang.String name)
- Parameters:
name
- The _unique_ name of the resulting resource.
-
FlowLog
public FlowLog(java.lang.String name, FlowLogArgs args)
- Parameters:
name
- The _unique_ name of the resulting resource.args
- The arguments to use to populate this resource's properties.
-
FlowLog
public FlowLog(java.lang.String name, FlowLogArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options)
- Parameters:
name
- The _unique_ name of the resulting resource.args
- The arguments to use to populate this resource's properties.options
- A bag of options that control this resource's behavior.
-
-
Method Detail
-
enabled
public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> enabled()
- Returns:
- Flag to enable/disable flow logging.
-
etag
public com.pulumi.core.Output<java.lang.String> etag()
- Returns:
- A unique read-only string that changes whenever the resource is updated.
-
flowAnalyticsConfiguration
public com.pulumi.core.Output<java.util.Optional<TrafficAnalyticsPropertiesResponse>> flowAnalyticsConfiguration()
- Returns:
- Parameters that define the configuration of traffic analytics.
-
format
public com.pulumi.core.Output<java.util.Optional<FlowLogFormatParametersResponse>> format()
- Returns:
- Parameters that define the flow log format.
-
location
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> location()
- Returns:
- Resource location.
-
name
public com.pulumi.core.Output<java.lang.String> name()
- Returns:
- Resource name.
-
provisioningState
public com.pulumi.core.Output<java.lang.String> provisioningState()
- Returns:
- The provisioning state of the flow log.
-
retentionPolicy
public com.pulumi.core.Output<java.util.Optional<RetentionPolicyParametersResponse>> retentionPolicy()
- Returns:
- Parameters that define the retention policy for flow log.
-
storageId
public com.pulumi.core.Output<java.lang.String> storageId()
- Returns:
- ID of the storage account which is used to store the flow log.
-
tags
public com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,java.lang.String>>> tags()
- Returns:
- Resource tags.
-
targetResourceGuid
public com.pulumi.core.Output<java.lang.String> targetResourceGuid()
- Returns:
- Guid of network security group to which flow log will be applied.
-
targetResourceId
public com.pulumi.core.Output<java.lang.String> targetResourceId()
- Returns:
- ID of network security group to which flow log will be applied.
-
type
public com.pulumi.core.Output<java.lang.String> type()
- Returns:
- Resource type.
-
get
public static FlowLog get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.- Parameters:
name
- The _unique_ name of the resulting resource.id
- The _unique_ provider ID of the resource to lookup.options
- Optional settings to control the behavior of the CustomResource.
-
-