OrganizationSinkArgs

data class OrganizationSinkArgs(val bigqueryOptions: Output<OrganizationSinkBigqueryOptionsArgs>? = null, val description: Output<String>? = null, val destination: Output<String>? = null, val disabled: Output<Boolean>? = null, val exclusions: Output<List<OrganizationSinkExclusionArgs>>? = null, val filter: Output<String>? = null, val includeChildren: Output<Boolean>? = null, val name: Output<String>? = null, val orgId: Output<String>? = null) : ConvertibleToJava<OrganizationSinkArgs>

Manages a organization-level logging sink. For more information see:

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.storage.Bucket;
import com.pulumi.gcp.storage.BucketArgs;
import com.pulumi.gcp.logging.OrganizationSink;
import com.pulumi.gcp.logging.OrganizationSinkArgs;
import com.pulumi.gcp.projects.IAMMember;
import com.pulumi.gcp.projects.IAMMemberArgs;
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 log_bucket = new Bucket("log-bucket", BucketArgs.builder()
.location("US")
.build());
var my_sink = new OrganizationSink("my-sink", OrganizationSinkArgs.builder()
.description("some explanation on what this is")
.orgId("123456789")
.destination(log_bucket.name().applyValue(name -> String.format("storage.googleapis.com/%s", name)))
.filter("resource.type = gce_instance AND severity >= WARNING")
.build());
var log_writer = new IAMMember("log-writer", IAMMemberArgs.builder()
.project("your-project-id")
.role("roles/storage.objectCreator")
.member(my_sink.writerIdentity())
.build());
}
}

Import

Organization-level logging sinks can be imported using this format:

$ pulumi import gcp:logging/organizationSink:OrganizationSink my_sink organizations/{{organization_id}}/sinks/{{sink_id}}

Constructors

Link copied to clipboard
constructor(bigqueryOptions: Output<OrganizationSinkBigqueryOptionsArgs>? = null, description: Output<String>? = null, destination: Output<String>? = null, disabled: Output<Boolean>? = null, exclusions: Output<List<OrganizationSinkExclusionArgs>>? = null, filter: Output<String>? = null, includeChildren: Output<Boolean>? = null, name: Output<String>? = null, orgId: Output<String>? = null)

Properties

Link copied to clipboard

Options that affect sinks exporting data to BigQuery. Structure documented below.

Link copied to clipboard
val description: Output<String>? = null

A description of this sink. The maximum length of the description is 8000 characters.

Link copied to clipboard
val destination: Output<String>? = null

The destination of the sink (or, in other words, where logs are written to). Can be a Cloud Storage bucket, a PubSub topic, a BigQuery dataset or a Cloud Logging bucket. Examples:

Link copied to clipboard
val disabled: Output<Boolean>? = null

If set to True, then this sink is disabled and it does not export any log entries.

Link copied to clipboard

Log entries that match any of the exclusion filters will not be exported. If a log entry is matched by both filter and one of exclusions.filter, it will not be exported. Can be repeated multiple times for multiple exclusions. Structure is documented below.

Link copied to clipboard
val filter: Output<String>? = null

The filter to apply when exporting logs. Only log entries that match the filter are exported. See Advanced Log Filters for information on how to write a filter.

Link copied to clipboard
val includeChildren: Output<Boolean>? = null

Whether or not to include children organizations in the sink export. If true, logs associated with child projects are also exported; otherwise only logs relating to the provided organization are included.

Link copied to clipboard
val name: Output<String>? = null

The name of the logging sink.

Link copied to clipboard
val orgId: Output<String>? = null

The numeric ID of the organization to be exported to the sink.

Functions

Link copied to clipboard
open override fun toJava(): OrganizationSinkArgs