Google Cloud Classic v7.29.0 published on Wednesday, Jun 26, 2024 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:
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",
});
import pulumi
import pulumi_gcp as gcp
project_sink = gcp.logging.get_sink(id="projects/0123456789/sinks/my-sink-name")
package main
import (
	"github.com/pulumi/pulumi-gcp/sdk/v7/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
	})
}
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",
    });
});
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());
    }
}
variables:
  project-sink:
    fn::invoke:
      Function: gcp:logging:getSink
      Arguments:
        id: projects/0123456789/sinks/my-sink-name
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>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]func GetSink(ctx *Context, args *GetSinkArgs, opts ...InvokeOption) (*GetSinkResult, error)
func GetSinkOutput(ctx *Context, args *GetSinkOutputArgs, opts ...InvokeOption) GetSinkResultOutput> 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)
}public static CompletableFuture<GetSinkResult> getSink(GetSinkArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: gcp:logging/getSink:getSink
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Id 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 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 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 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 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 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:
- Bigquery
Options List<GetSink Bigquery Option>  - 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<Get
Sink Exclusion>  - 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. - Writer
Identity string - The identity associated with this sink. This identity must be granted write access to the configured 
destination. 
- Bigquery
Options []GetSink Bigquery Option  - 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
[]Get
Sink Exclusion  - 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. - Writer
Identity string - The identity associated with this sink. This identity must be granted write access to the configured 
destination. 
- bigquery
Options List<GetSink Bigquery Option>  - 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<Get
Sink Exclusion>  - 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. - writer
Identity String - The identity associated with this sink. This identity must be granted write access to the configured 
destination. 
- bigquery
Options GetSink Bigquery Option[]  - 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
Get
Sink Exclusion[]  - 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. - writer
Identity string - The identity associated with this sink. This identity must be granted write access to the configured 
destination. 
- bigquery_
options Sequence[GetSink Bigquery Option]  - 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[Get
Sink Exclusion]  - 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. 
- bigquery
Options 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. - writer
Identity String - The identity associated with this sink. This identity must be granted write access to the configured 
destination. 
Supporting Types
GetSinkBigqueryOption   
- Use
Partitioned boolTables  - Whether BigQuery's partition tables are used.
 
- Use
Partitioned boolTables  - Whether BigQuery's partition tables are used.
 
- use
Partitioned BooleanTables  - Whether BigQuery's partition tables are used.
 
- use
Partitioned booleanTables  - Whether BigQuery's partition tables are used.
 
- use_
partitioned_ booltables  - Whether BigQuery's partition tables are used.
 
- use
Partitioned BooleanTables  - Whether BigQuery's partition tables are used.
 
GetSinkExclusion  
- Description string
 - A description of this exclusion.
 - Disabled bool
 - Whether this exclusion is disabled and it does not exclude any log entries.
 - Filter string
 - An advanced logs filter that matches the log entries to be excluded.
 - Name string
 - A client-assigned identifier, such as 
load-balancer-exclusion. 
- Description string
 - A description of this exclusion.
 - Disabled bool
 - Whether this exclusion is disabled and it does not exclude any log entries.
 - Filter string
 - An advanced logs filter that matches the log entries to be excluded.
 - Name string
 - A client-assigned identifier, such as 
load-balancer-exclusion. 
- description String
 - A description of this exclusion.
 - disabled Boolean
 - Whether this exclusion is disabled and it does not exclude any log entries.
 - filter String
 - An advanced logs filter that matches the log entries to be excluded.
 - name String
 - A client-assigned identifier, such as 
load-balancer-exclusion. 
- description string
 - A description of this exclusion.
 - disabled boolean
 - Whether this exclusion is disabled and it does not exclude any log entries.
 - filter string
 - An advanced logs filter that matches the log entries to be excluded.
 - name string
 - A client-assigned identifier, such as 
load-balancer-exclusion. 
- description str
 - A description of this exclusion.
 - disabled bool
 - Whether this exclusion is disabled and it does not exclude any log entries.
 - filter str
 - An advanced logs filter that matches the log entries to be excluded.
 - name str
 - A client-assigned identifier, such as 
load-balancer-exclusion. 
- description String
 - A description of this exclusion.
 - disabled Boolean
 - Whether this exclusion is disabled and it does not exclude any log entries.
 - filter String
 - An advanced logs filter that matches the log entries to be excluded.
 - name 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-betaTerraform Provider.