getLogView function
Get information about a Google Cloud Logging Log View. For more information, see the official documentation and API.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const _default = gcp.logging.getLogView({
parent: "projects/my-project",
location: "global",
bucket: "_Default",
name: "my-view",
});
import pulumi
import pulumi_gcp as gcp
default = gcp.logging.get_log_view(parent="projects/my-project",
location="global",
bucket="_Default",
name="my-view")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var @default = Gcp.Logging.GetLogView.Invoke(new()
{
Parent = "projects/my-project",
Location = "global",
Bucket = "_Default",
Name = "my-view",
});
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/logging"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := logging.LookupLogView(ctx, &logging.LookupLogViewArgs{
Parent: "projects/my-project",
Location: "global",
Bucket: "_Default",
Name: "my-view",
}, nil)
if err != nil {
return err
}
return nil
})
}
pulumi {
required_providers {
gcp = {
source = "pulumi/gcp"
}
}
}
data "gcp_logging_getlogview" "default" {
parent = "projects/my-project"
location = "global"
bucket = "_Default"
name = "my-view"
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.logging.LoggingFunctions;
import com.pulumi.gcp.logging.inputs.GetLogViewArgs;
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) {
final var default = LoggingFunctions.getLogView(GetLogViewArgs.builder()
.parent("projects/my-project")
.location("global")
.bucket("_Default")
.name("my-view")
.build());
}
}
variables:
default:
fn::invoke:
function: gcp:logging:getLogView
arguments:
parent: projects/my-project
location: global
bucket: _Default
name: my-view
args Arguments passed to this invoke. Arguments for getLogView.
options Invoke options controlling this call.
Implementation
Future<GetLogViewResult> getLogView(
GetLogViewArgs args, {
pulumi.InvokeOptions? options,
}) async {
final deployment = pulumi.Deployment.instance;
final result = await deployment.invoke<Map<String, dynamic>>(
'gcp:logging/getLogView:getLogView',
args.toMap(),
options: pulumi.toDeploymentInvokeOptions(options),
);
return GetLogViewResult.fromMap(result);
}