1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. logging
  5. getSink
Google Cloud v8.25.1 published on Wednesday, Apr 9, 2025 by Pulumi

gcp.logging.getSink

Explore with Pulumi AI

Use this data source to get a project, folder, organization or billing account logging sink details. To get more information about Service, see:

API documentation

Example Usage

Retrieve Project Logging Sink Basic

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

const project_sink = gcp.logging.getSink({
    id: "projects/0123456789/sinks/my-sink-name",
});
Copy
import pulumi
import pulumi_gcp as gcp

project_sink = gcp.logging.get_sink(id="projects/0123456789/sinks/my-sink-name")
Copy
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/logging"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := logging.GetSink(ctx, &logging.GetSinkArgs{
			Id: "projects/0123456789/sinks/my-sink-name",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var project_sink = Gcp.Logging.GetSink.Invoke(new()
    {
        Id = "projects/0123456789/sinks/my-sink-name",
    });

});
Copy
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.GetSinkArgs;
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) {
        final var project-sink = LoggingFunctions.getSink(GetSinkArgs.builder()
            .id("projects/0123456789/sinks/my-sink-name")
            .build());

    }
}
Copy
variables:
  project-sink:
    fn::invoke:
      function: gcp:logging:getSink
      arguments:
        id: projects/0123456789/sinks/my-sink-name
Copy

Using getSink

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getSink(args: GetSinkArgs, opts?: InvokeOptions): Promise<GetSinkResult>
function getSinkOutput(args: GetSinkOutputArgs, opts?: InvokeOptions): Output<GetSinkResult>
Copy
def get_sink(id: Optional[str] = None,
             opts: Optional[InvokeOptions] = None) -> GetSinkResult
def get_sink_output(id: Optional[pulumi.Input[str]] = None,
             opts: Optional[InvokeOptions] = None) -> Output[GetSinkResult]
Copy
func GetSink(ctx *Context, args *GetSinkArgs, opts ...InvokeOption) (*GetSinkResult, error)
func GetSinkOutput(ctx *Context, args *GetSinkOutputArgs, opts ...InvokeOption) GetSinkResultOutput
Copy

> Note: This function is named GetSink in the Go SDK.

public static class GetSink 
{
    public static Task<GetSinkResult> InvokeAsync(GetSinkArgs args, InvokeOptions? opts = null)
    public static Output<GetSinkResult> Invoke(GetSinkInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetSinkResult> getSink(GetSinkArgs args, InvokeOptions options)
public static Output<GetSinkResult> getSink(GetSinkArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: gcp:logging/getSink:getSink
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Id This property is required. string
The identifier for the resource. Examples:

  • projects/[PROJECT_ID]/sinks/[SINK_NAME]
  • organizations/[ORGANIZATION_ID]/sinks/[SINK_NAME]
  • billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_NAME]
  • folders/[FOLDER_ID]/sinks/[SINK_NAME]
Id This property is required. string
The identifier for the resource. Examples:

  • projects/[PROJECT_ID]/sinks/[SINK_NAME]
  • organizations/[ORGANIZATION_ID]/sinks/[SINK_NAME]
  • billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_NAME]
  • folders/[FOLDER_ID]/sinks/[SINK_NAME]
id This property is required. String
The identifier for the resource. Examples:

  • projects/[PROJECT_ID]/sinks/[SINK_NAME]
  • organizations/[ORGANIZATION_ID]/sinks/[SINK_NAME]
  • billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_NAME]
  • folders/[FOLDER_ID]/sinks/[SINK_NAME]
id This property is required. string
The identifier for the resource. Examples:

  • projects/[PROJECT_ID]/sinks/[SINK_NAME]
  • organizations/[ORGANIZATION_ID]/sinks/[SINK_NAME]
  • billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_NAME]
  • folders/[FOLDER_ID]/sinks/[SINK_NAME]
id This property is required. str
The identifier for the resource. Examples:

  • projects/[PROJECT_ID]/sinks/[SINK_NAME]
  • organizations/[ORGANIZATION_ID]/sinks/[SINK_NAME]
  • billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_NAME]
  • folders/[FOLDER_ID]/sinks/[SINK_NAME]
id This property is required. String
The identifier for the resource. Examples:

  • projects/[PROJECT_ID]/sinks/[SINK_NAME]
  • organizations/[ORGANIZATION_ID]/sinks/[SINK_NAME]
  • billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_NAME]
  • folders/[FOLDER_ID]/sinks/[SINK_NAME]

getSink Result

The following output properties are available:

BigqueryOptions List<GetSinkBigqueryOption>
Options that affect sinks exporting data to BigQuery. Structure is documented below.
Description string
A description of this exclusion.
Destination string
The destination of the sink (or, in other words, where logs are written to).
Disabled bool
Whether this exclusion is disabled and it does not exclude any log entries.
Exclusions List<GetSinkExclusion>
Log entries that match any of the exclusion filters are not exported. Structure is documented below.
Filter string
An advanced logs filter that matches the log entries to be excluded.
Id string
Name string
A client-assigned identifier, such as load-balancer-exclusion.
WriterIdentity string
The identity associated with this sink. This identity must be granted write access to the configured destination.
BigqueryOptions []GetSinkBigqueryOption
Options that affect sinks exporting data to BigQuery. Structure is documented below.
Description string
A description of this exclusion.
Destination string
The destination of the sink (or, in other words, where logs are written to).
Disabled bool
Whether this exclusion is disabled and it does not exclude any log entries.
Exclusions []GetSinkExclusion
Log entries that match any of the exclusion filters are not exported. Structure is documented below.
Filter string
An advanced logs filter that matches the log entries to be excluded.
Id string
Name string
A client-assigned identifier, such as load-balancer-exclusion.
WriterIdentity string
The identity associated with this sink. This identity must be granted write access to the configured destination.
bigqueryOptions List<GetSinkBigqueryOption>
Options that affect sinks exporting data to BigQuery. Structure is documented below.
description String
A description of this exclusion.
destination String
The destination of the sink (or, in other words, where logs are written to).
disabled Boolean
Whether this exclusion is disabled and it does not exclude any log entries.
exclusions List<GetSinkExclusion>
Log entries that match any of the exclusion filters are not exported. Structure is documented below.
filter String
An advanced logs filter that matches the log entries to be excluded.
id String
name String
A client-assigned identifier, such as load-balancer-exclusion.
writerIdentity String
The identity associated with this sink. This identity must be granted write access to the configured destination.
bigqueryOptions GetSinkBigqueryOption[]
Options that affect sinks exporting data to BigQuery. Structure is documented below.
description string
A description of this exclusion.
destination string
The destination of the sink (or, in other words, where logs are written to).
disabled boolean
Whether this exclusion is disabled and it does not exclude any log entries.
exclusions GetSinkExclusion[]
Log entries that match any of the exclusion filters are not exported. Structure is documented below.
filter string
An advanced logs filter that matches the log entries to be excluded.
id string
name string
A client-assigned identifier, such as load-balancer-exclusion.
writerIdentity string
The identity associated with this sink. This identity must be granted write access to the configured destination.
bigquery_options Sequence[GetSinkBigqueryOption]
Options that affect sinks exporting data to BigQuery. Structure is documented below.
description str
A description of this exclusion.
destination str
The destination of the sink (or, in other words, where logs are written to).
disabled bool
Whether this exclusion is disabled and it does not exclude any log entries.
exclusions Sequence[GetSinkExclusion]
Log entries that match any of the exclusion filters are not exported. Structure is documented below.
filter str
An advanced logs filter that matches the log entries to be excluded.
id str
name str
A client-assigned identifier, such as load-balancer-exclusion.
writer_identity str
The identity associated with this sink. This identity must be granted write access to the configured destination.
bigqueryOptions List<Property Map>
Options that affect sinks exporting data to BigQuery. Structure is documented below.
description String
A description of this exclusion.
destination String
The destination of the sink (or, in other words, where logs are written to).
disabled Boolean
Whether this exclusion is disabled and it does not exclude any log entries.
exclusions List<Property Map>
Log entries that match any of the exclusion filters are not exported. Structure is documented below.
filter String
An advanced logs filter that matches the log entries to be excluded.
id String
name String
A client-assigned identifier, such as load-balancer-exclusion.
writerIdentity String
The identity associated with this sink. This identity must be granted write access to the configured destination.

Supporting Types

GetSinkBigqueryOption

UsePartitionedTables This property is required. bool
Whether BigQuery's partition tables are used.
UsePartitionedTables This property is required. bool
Whether BigQuery's partition tables are used.
usePartitionedTables This property is required. Boolean
Whether BigQuery's partition tables are used.
usePartitionedTables This property is required. boolean
Whether BigQuery's partition tables are used.
use_partitioned_tables This property is required. bool
Whether BigQuery's partition tables are used.
usePartitionedTables This property is required. Boolean
Whether BigQuery's partition tables are used.

GetSinkExclusion

Description This property is required. string
A description of this exclusion.
Disabled This property is required. bool
Whether this exclusion is disabled and it does not exclude any log entries.
Filter This property is required. string
An advanced logs filter that matches the log entries to be excluded.
Name This property is required. string
A client-assigned identifier, such as load-balancer-exclusion.
Description This property is required. string
A description of this exclusion.
Disabled This property is required. bool
Whether this exclusion is disabled and it does not exclude any log entries.
Filter This property is required. string
An advanced logs filter that matches the log entries to be excluded.
Name This property is required. string
A client-assigned identifier, such as load-balancer-exclusion.
description This property is required. String
A description of this exclusion.
disabled This property is required. Boolean
Whether this exclusion is disabled and it does not exclude any log entries.
filter This property is required. String
An advanced logs filter that matches the log entries to be excluded.
name This property is required. String
A client-assigned identifier, such as load-balancer-exclusion.
description This property is required. string
A description of this exclusion.
disabled This property is required. boolean
Whether this exclusion is disabled and it does not exclude any log entries.
filter This property is required. string
An advanced logs filter that matches the log entries to be excluded.
name This property is required. string
A client-assigned identifier, such as load-balancer-exclusion.
description This property is required. str
A description of this exclusion.
disabled This property is required. bool
Whether this exclusion is disabled and it does not exclude any log entries.
filter This property is required. str
An advanced logs filter that matches the log entries to be excluded.
name This property is required. str
A client-assigned identifier, such as load-balancer-exclusion.
description This property is required. String
A description of this exclusion.
disabled This property is required. Boolean
Whether this exclusion is disabled and it does not exclude any log entries.
filter This property is required. String
An advanced logs filter that matches the log entries to be excluded.
name This property is required. String
A client-assigned identifier, such as load-balancer-exclusion.

Package Details

Repository
Google Cloud (GCP) Classic pulumi/pulumi-gcp
License
Apache-2.0
Notes
This Pulumi package is based on the google-beta Terraform Provider.