Log View
Describes a view over log entries in a bucket. To get more information about LogView, see:
How-to Guides
Example Usage
Logging Log View Basic
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.logging.ProjectBucketConfig;
import com.pulumi.gcp.logging.ProjectBucketConfigArgs;
import com.pulumi.gcp.logging.LogView;
import com.pulumi.gcp.logging.LogViewArgs;
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 loggingLogViewProjectBucketConfig = new ProjectBucketConfig("loggingLogViewProjectBucketConfig", ProjectBucketConfigArgs.builder()
.project("my-project-name")
.location("global")
.retentionDays(30)
.bucketId("_Default")
.build());
var loggingLogViewLogView = new LogView("loggingLogViewLogView", LogViewArgs.builder()
.bucket(loggingLogViewProjectBucketConfig.id())
.description("A logging view configured with Terraform")
.filter("SOURCE(\"projects/myproject\") AND resource.type = \"gce_instance\" AND LOG_ID(\"stdout\")")
.build());
}
}
Content copied to clipboard
Import
LogView can be imported using any of these accepted formats:
$ pulumi import gcp:logging/logView:LogView default {{parent}}/locations/{{location}}/buckets/{{bucket}}/views/{{name}}
Content copied to clipboard
Properties
Link copied to clipboard
Output only. The creation timestamp of the view.
Link copied to clipboard
Describes this view.
Link copied to clipboard
Filter that restricts which log entries in a bucket are visible in this view. Filters are restricted to be a logical AND of ==/!= of any of the following: - originating project/folder/organization/billing account. - resource type - log id For example: SOURCE("projects/myproject") AND resource.type = "gce_instance" AND LOG_ID("stdout")
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Output only. The last update timestamp of the view.