com.pulumi.gcp.logging.kotlin.LogScopeArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-gcp-kotlin Show documentation
Show all versions of pulumi-gcp-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.gcp.logging.kotlin
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.logging.LogScopeArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.jvm.JvmName
/**
* Describes a group of resources to read log entries from
* To get more information about LogScope, see:
* * [API documentation](https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.locations.logScopes)
* * How-to Guides
* * [Official Documentation](https://cloud.google.com/logging/docs/apis)
* ## Example Usage
* ### Logging Log Scope Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const loggingLogScope = new gcp.logging.LogScope("logging_log_scope", {
* parent: "projects/my-project-name",
* location: "global",
* name: "projects/my-project-name/locations/global/logScopes/my-log-scope",
* resourceNames: [
* "projects/my-project-name",
* "projects/my-project-name/locations/global/buckets/_Default/views/view1",
* "projects/my-project-name/locations/global/buckets/_Default/views/view2",
* ],
* description: "A log scope configured with Terraform",
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* logging_log_scope = gcp.logging.LogScope("logging_log_scope",
* parent="projects/my-project-name",
* location="global",
* name="projects/my-project-name/locations/global/logScopes/my-log-scope",
* resource_names=[
* "projects/my-project-name",
* "projects/my-project-name/locations/global/buckets/_Default/views/view1",
* "projects/my-project-name/locations/global/buckets/_Default/views/view2",
* ],
* description="A log scope configured with Terraform")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var loggingLogScope = new Gcp.Logging.LogScope("logging_log_scope", new()
* {
* Parent = "projects/my-project-name",
* Location = "global",
* Name = "projects/my-project-name/locations/global/logScopes/my-log-scope",
* ResourceNames = new[]
* {
* "projects/my-project-name",
* "projects/my-project-name/locations/global/buckets/_Default/views/view1",
* "projects/my-project-name/locations/global/buckets/_Default/views/view2",
* },
* Description = "A log scope configured with Terraform",
* });
* });
* ```
* ```go
* 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.NewLogScope(ctx, "logging_log_scope", &logging.LogScopeArgs{
* Parent: pulumi.String("projects/my-project-name"),
* Location: pulumi.String("global"),
* Name: pulumi.String("projects/my-project-name/locations/global/logScopes/my-log-scope"),
* ResourceNames: pulumi.StringArray{
* pulumi.String("projects/my-project-name"),
* pulumi.String("projects/my-project-name/locations/global/buckets/_Default/views/view1"),
* pulumi.String("projects/my-project-name/locations/global/buckets/_Default/views/view2"),
* },
* Description: pulumi.String("A log scope configured with Terraform"),
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.gcp.logging.LogScope;
* import com.pulumi.gcp.logging.LogScopeArgs;
* 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 loggingLogScope = new LogScope("loggingLogScope", LogScopeArgs.builder()
* .parent("projects/my-project-name")
* .location("global")
* .name("projects/my-project-name/locations/global/logScopes/my-log-scope")
* .resourceNames(
* "projects/my-project-name",
* "projects/my-project-name/locations/global/buckets/_Default/views/view1",
* "projects/my-project-name/locations/global/buckets/_Default/views/view2")
* .description("A log scope configured with Terraform")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* loggingLogScope:
* type: gcp:logging:LogScope
* name: logging_log_scope
* properties:
* parent: projects/my-project-name
* location: global
* name: projects/my-project-name/locations/global/logScopes/my-log-scope
* resourceNames:
* - projects/my-project-name
* - projects/my-project-name/locations/global/buckets/_Default/views/view1
* - projects/my-project-name/locations/global/buckets/_Default/views/view2
* description: A log scope configured with Terraform
* ```
*
* ## Import
* LogScope can be imported using any of these accepted formats:
* * `{{parent}}/locations/{{location}}/logScopes/{{name}}`
* When using the `pulumi import` command, LogScope can be imported using one of the formats above. For example:
* ```sh
* $ pulumi import gcp:logging/logScope:LogScope default {{parent}}/locations/{{location}}/logScopes/{{name}}
* ```
* @property description Describes this log scopes.
* @property location The location of the resource. The only supported location is global so far.
* @property name The resource name of the log scope. For example: \`projects/my-project/locations/global/logScopes/my-log-scope\`
* @property parent The parent of the resource.
* @property resourceNames Names of one or more parent resources : * \`projects/[PROJECT_ID]\` May alternatively be one or more views : * \`projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]\` A log scope can include a maximum of 50 projects and a maximum of 100 resources in total.
* - - -
*/
public data class LogScopeArgs(
public val description: Output? = null,
public val location: Output? = null,
public val name: Output? = null,
public val parent: Output? = null,
public val resourceNames: Output>? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.gcp.logging.LogScopeArgs =
com.pulumi.gcp.logging.LogScopeArgs.builder()
.description(description?.applyValue({ args0 -> args0 }))
.location(location?.applyValue({ args0 -> args0 }))
.name(name?.applyValue({ args0 -> args0 }))
.parent(parent?.applyValue({ args0 -> args0 }))
.resourceNames(resourceNames?.applyValue({ args0 -> args0.map({ args0 -> args0 }) })).build()
}
/**
* Builder for [LogScopeArgs].
*/
@PulumiTagMarker
public class LogScopeArgsBuilder internal constructor() {
private var description: Output? = null
private var location: Output? = null
private var name: Output? = null
private var parent: Output? = null
private var resourceNames: Output>? = null
/**
* @param value Describes this log scopes.
*/
@JvmName("qnnggbpaeudekckm")
public suspend fun description(`value`: Output) {
this.description = value
}
/**
* @param value The location of the resource. The only supported location is global so far.
*/
@JvmName("hqxdwcmonwrxhnfj")
public suspend fun location(`value`: Output) {
this.location = value
}
/**
* @param value The resource name of the log scope. For example: \`projects/my-project/locations/global/logScopes/my-log-scope\`
*/
@JvmName("wtdkjhauyubiepsl")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value The parent of the resource.
*/
@JvmName("dcofmwmtxjllavmb")
public suspend fun parent(`value`: Output) {
this.parent = value
}
/**
* @param value Names of one or more parent resources : * \`projects/[PROJECT_ID]\` May alternatively be one or more views : * \`projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]\` A log scope can include a maximum of 50 projects and a maximum of 100 resources in total.
* - - -
*/
@JvmName("jiixxabtocwooyib")
public suspend fun resourceNames(`value`: Output>) {
this.resourceNames = value
}
@JvmName("rrhorjcosywbntot")
public suspend fun resourceNames(vararg values: Output) {
this.resourceNames = Output.all(values.asList())
}
/**
* @param values Names of one or more parent resources : * \`projects/[PROJECT_ID]\` May alternatively be one or more views : * \`projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]\` A log scope can include a maximum of 50 projects and a maximum of 100 resources in total.
* - - -
*/
@JvmName("sxasnsojyunfofps")
public suspend fun resourceNames(values: List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy