OrganizationVpcFlowLogsConfig class

VPC Flow Logs Config is a resource that lets you configure Flow Logs for Organization.

Example Usage

Network Management Org Vpc Flow Logs Config Basic

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const org_test = new gcp.networkmanagement.OrganizationVpcFlowLogsConfig("org-test", {
    vpcFlowLogsConfigId: "basic-org-test-id",
    location: "global",
    organization: "123456789",
});
import pulumi
import pulumi_gcp as gcp

org_test = gcp.networkmanagement.OrganizationVpcFlowLogsConfig("org-test",
    vpc_flow_logs_config_id="basic-org-test-id",
    location="global",
    organization="123456789")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() =>
{
    var org_test = new Gcp.NetworkManagement.OrganizationVpcFlowLogsConfig("org-test", new()
    {
        VpcFlowLogsConfigId = "basic-org-test-id",
        Location = "global",
        Organization = "123456789",
    });

});
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/networkmanagement"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := networkmanagement.NewOrganizationVpcFlowLogsConfig(ctx, "org-test", &networkmanagement.OrganizationVpcFlowLogsConfigArgs{
			VpcFlowLogsConfigId: pulumi.String("basic-org-test-id"),
			Location:            pulumi.String("global"),
			Organization:        pulumi.String("123456789"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    gcp = {
      source = "pulumi/gcp"
    }
  }
}

resource "gcp_networkmanagement_organizationvpcflowlogsconfig" "org-test" {
  vpc_flow_logs_config_id = "basic-org-test-id"
  location                = "global"
  organization            = "123456789"
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.networkmanagement.OrganizationVpcFlowLogsConfig;
import com.pulumi.gcp.networkmanagement.OrganizationVpcFlowLogsConfigArgs;
import java.util.ArrayList;
import java.util.Arrays;
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 org_test = new OrganizationVpcFlowLogsConfig("org-test", OrganizationVpcFlowLogsConfigArgs.builder()
            .vpcFlowLogsConfigId("basic-org-test-id")
            .location("global")
            .organization("123456789")
            .build());

    }
}
resources:
  org-test:
    type: gcp:networkmanagement:OrganizationVpcFlowLogsConfig
    properties:
      vpcFlowLogsConfigId: basic-org-test-id
      location: global
      organization: '123456789'

Import

OrganizationVpcFlowLogsConfig can be imported using any of these accepted formats:

  • organizations/{{organization}}/locations/{{location}}/vpcFlowLogsConfigs/{{vpc_flow_logs_config_id}}
  • {{organization}}/{{location}}/{{vpc_flow_logs_config_id}}

When using the pulumi import command, OrganizationVpcFlowLogsConfig can be imported using one of the formats above. For example:

$ pulumi import gcp:networkmanagement/organizationVpcFlowLogsConfig:OrganizationVpcFlowLogsConfig default organizations/{{organization}}/locations/{{location}}/vpcFlowLogsConfigs/{{vpc_flow_logs_config_id}}
$ pulumi import gcp:networkmanagement/organizationVpcFlowLogsConfig:OrganizationVpcFlowLogsConfig default {{organization}}/{{location}}/{{vpc_flow_logs_config_id}}

Constructors

OrganizationVpcFlowLogsConfig(String name, {OrganizationVpcFlowLogsConfigArgs? args, CustomResourceOptions? options})
Creates a new OrganizationVpcFlowLogsConfig. name The Pulumi resource name. args Arguments used to configure this OrganizationVpcFlowLogsConfig. The set of arguments for OrganizationVpcFlowLogsConfig. options Resource options controlling this resource's behavior.
OrganizationVpcFlowLogsConfig.reference(String urn)
Creates a typed reference to an existing OrganizationVpcFlowLogsConfig resource.

Properties

aggregationInterval ↔ Output<String>
Optional. The aggregation interval for the logs. Default value is INTERVAL_5_SEC. Possible values: INTERVAL_5_SEC INTERVAL_30_SEC INTERVAL_1_MIN INTERVAL_5_MIN INTERVAL_10_MIN INTERVAL_15_MIN
latefinal
childResources → Set<Resource>
finalinherited
completionSources ↔ Map<String, IOutputCompletionSource>
latefinalinherited
createTime ↔ Output<String>
Output only. The time the config was created.
latefinal
crossProjectMetadata ↔ Output<String>
Determines whether to include cross project annotations in the logs. This field is available only for organization configurations. If not specified in org configs will be set to CROSS_PROJECT_METADATA_ENABLED. Possible values: CROSS_PROJECT_METADATA_ENABLED CROSS_PROJECT_METADATA_DISABLED Possible values are: CROSS_PROJECT_METADATA_ENABLED, CROSS_PROJECT_METADATA_DISABLED.
latefinal
deletionPolicy ↔ Output<String>
Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
latefinal
description ↔ Output<String?>
Optional. The user-supplied description of the VPC Flow Logs configuration. Maximum of 512 characters.
latefinal
effectiveLabels ↔ Output<Map<String, String>>
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
latefinal
filterExpr ↔ Output<String?>
Optional. Export filter used to define which VPC Flow Logs should be logged.
latefinal
flowSampling ↔ Output<double>
Optional. The value of the field must be in (0, 1]. The sampling rate of VPC Flow Logs where 1.0 means all collected logs are reported. Setting the sampling rate to 0.0 is not allowed. If you want to disable VPC Flow Logs, use the state field instead. Default value is 1.0
latefinal
hashCode → int
The hash code for this object.
no setterinherited
id ↔ Output<String>
getter/setter pairinherited
isCustom → bool
Returns whether this resource is provider-managed.
no setterinherited
isProtected → bool
Returns whether this resource is protected from deletion.
no setterinherited
isRemote → bool
Whether this resource is registered as remote.
no setterinherited
isResourceReference → bool
Whether this instance represents a resource value returned over RPC.
finalinherited
labels ↔ Output<Map<String, String>?>
Optional. Resource labels to represent the user-provided metadata.
latefinal
location ↔ Output<String>
Resource ID segment making up resource name. It identifies the resource within its parent collection as described in https://google.aip.dev/122. See documentation for resource type networkmanagement.googleapis.com/VpcFlowLogsConfig.
latefinal
metadata ↔ Output<String>
Optional. Configures whether all, none or a subset of metadata fields should be added to the reported VPC flow logs. Default value is INCLUDE_ALL_METADATA. Possible values: METADATA_UNSPECIFIED INCLUDE_ALL_METADATA EXCLUDE_ALL_METADATA CUSTOM_METADATA
latefinal
metadataFields ↔ Output<List<String>?>
Optional. Custom metadata fields to include in the reported VPC flow logs. Can only be specified if "metadata" was set to CUSTOM_METADATA.
latefinal
name ↔ Output<String>
Identifier. Unique name of the configuration using the form: organizations/{org_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id}
latefinal
organization ↔ Output<String>
Resource ID segment making up resource name. It identifies the resource within its parent collection as described in https://google.aip.dev/122.
latefinal
pulumiLabels ↔ Output<Map<String, String>>
The combination of labels configured directly on the resource and default labels configured on the provider.
latefinal
resourceTransforms → List<ResourceTransform>
Inherited/explicit async transforms.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
state ↔ Output<String>
Optional. The state of the VPC Flow Log configuration. Default value is ENABLED. When creating a new configuration, it must be enabled. Possible values: ENABLED DISABLED
latefinal
transformations → List<ResourceTransformation>
Inherited/explicit legacy transformations.
no setterinherited
updateTime ↔ Output<String>
Output only. The time the config was updated.
latefinal
urn ↔ Output<String>
latefinalinherited
vpcFlowLogsConfigId ↔ Output<String>
Required. ID of the VpcFlowLogsConfig.
latefinal

Methods

failId(Object error) → void
Completes this resource ID with an error when registration fails.
inherited
failOutputs(Object error) → void
Completes all output properties with error.
inherited
failUrn(Object error) → void
Completes this resource URN with an error when registration fails.
inherited
getProvider(String moduleMember) → ProviderResource?
Returns provider for moduleMember's package, if configured.
inherited
getResourceName() → String
Returns this resource's logical name.
inherited
getResourceType() → String
Returns this resource's Pulumi type token.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerOutput<T>(String propertyName, {Object? decoder(Object?)?, bool isSecret = false}) → Output<T>
Registers a dynamic output property for this resource.
inherited
resolveId(String? value, {required bool isKnown}) → void
Resolves the provider-assigned ID for this resource.
inherited
resolveOutputs(Struct outputs) → void
Resolves all output properties from a monitor response payload.
inherited
resolveUrn(String value) → void
Resolves this resource's URN once assigned by the engine.
inherited
serializeProperties(Map<String, dynamic> properties) → Future<Struct>
Serializes resource properties for RPC transmission.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

get(String name, Input<String> id, {OrganizationVpcFlowLogsConfigState? state, CustomResourceOptions? options}) → OrganizationVpcFlowLogsConfig
Gets an existing OrganizationVpcFlowLogsConfig resource's state with the given name and id.