All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.gcp.securitycenter.kotlin.V2ProjectSccBigQueryExport.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 8.20.1.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.securitycenter.kotlin

import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit

/**
 * Builder for [V2ProjectSccBigQueryExport].
 */
@PulumiTagMarker
public class V2ProjectSccBigQueryExportResourceBuilder internal constructor() {
    public var name: String? = null

    public var args: V2ProjectSccBigQueryExportArgs = V2ProjectSccBigQueryExportArgs()

    public var opts: CustomResourceOptions = CustomResourceOptions()

    /**
     * @param name The _unique_ name of the resulting resource.
     */
    public fun name(`value`: String) {
        this.name = value
    }

    /**
     * @param block The arguments to use to populate this resource's properties.
     */
    public suspend fun args(block: suspend V2ProjectSccBigQueryExportArgsBuilder.() -> Unit) {
        val builder = V2ProjectSccBigQueryExportArgsBuilder()
        block(builder)
        this.args = builder.build()
    }

    /**
     * @param block A bag of options that control this resource's behavior.
     */
    public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
        this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
    }

    internal fun build(): V2ProjectSccBigQueryExport {
        val builtJavaResource =
            com.pulumi.gcp.securitycenter.V2ProjectSccBigQueryExport(
                this.name,
                this.args.toJava(),
                this.opts.toJava(),
            )
        return V2ProjectSccBigQueryExport(builtJavaResource)
    }
}

/**
 * A Cloud Security Command Center (Cloud SCC) Big Query Export Config.
 * It represents exporting Security Command Center data, including assets, findings, and security marks
 * using gcloud scc bqexports
 * > **Note:** In order to use Cloud SCC resources, your organization must be enrolled
 * in [SCC Standard/Premium](https://cloud.google.com/security-command-center/docs/quickstart-security-command-center).
 * Without doing so, you may run into errors during resource creation.
 * To get more information about ProjectSccBigQueryExport, see:
 * * [API documentation](https://cloud.google.com/security-command-center/docs/reference/rest/v2/projects.locations.bigQueryExports)
 * * How-to Guides
 *     * [Official Documentation](https://cloud.google.com/security-command-center/docs/how-to-analyze-findings-in-big-query)
 * ## Example Usage
 * ### Scc V2 Project Big Query Export Config Basic
 * 
 * ```yaml
 * resources:
 *   default:
 *     type: gcp:bigquery:Dataset
 *     properties:
 *       datasetId: my_dataset_id
 *       friendlyName: test
 *       description: This is a test description
 *       location: US
 *       defaultTableExpirationMs: 3.6e+06
 *       defaultPartitionExpirationMs: null
 *       labels:
 *         env: default
 *   customBigQueryExportConfig:
 *     type: gcp:securitycenter:V2ProjectSccBigQueryExport
 *     name: custom_big_query_export_config
 *     properties:
 *       name: my-export
 *       bigQueryExportId: my-export
 *       project: my-project-name
 *       dataset: ${default.id}
 *       location: global
 *       description: Cloud Security Command Center Findings Big Query Export Config
 *       filter: state="ACTIVE" AND NOT mute="MUTED"
 * ```
 * 
 * ## Import
 * ProjectSccBigQueryExport can be imported using any of these accepted formats:
 * * `projects/{{project}}/locations/{{location}}/bigQueryExports/{{big_query_export_id}}`
 * * `{{project}}/{{location}}/{{big_query_export_id}}`
 * * `{{location}}/{{big_query_export_id}}`
 * When using the `pulumi import` command, ProjectSccBigQueryExport can be imported using one of the formats above. For example:
 * ```sh
 * $ pulumi import gcp:securitycenter/v2ProjectSccBigQueryExport:V2ProjectSccBigQueryExport default projects/{{project}}/locations/{{location}}/bigQueryExports/{{big_query_export_id}}
 * ```
 * ```sh
 * $ pulumi import gcp:securitycenter/v2ProjectSccBigQueryExport:V2ProjectSccBigQueryExport default {{project}}/{{location}}/{{big_query_export_id}}
 * ```
 * ```sh
 * $ pulumi import gcp:securitycenter/v2ProjectSccBigQueryExport:V2ProjectSccBigQueryExport default {{location}}/{{big_query_export_id}}
 * ```
 */
public class V2ProjectSccBigQueryExport internal constructor(
    override val javaResource: com.pulumi.gcp.securitycenter.V2ProjectSccBigQueryExport,
) : KotlinCustomResource(javaResource, V2ProjectSccBigQueryExportMapper) {
    /**
     * This must be unique within the organization.
     * - - -
     */
    public val bigQueryExportId: Output
        get() = javaResource.bigQueryExportId().applyValue({ args0 -> args0 })

    /**
     * The time at which the BigQuery export was created. This field is set by the server and will be ignored if provided on export on creation.
     * A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits.
     * Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
     */
    public val createTime: Output
        get() = javaResource.createTime().applyValue({ args0 -> args0 })

    /**
     * The dataset to write findings' updates to.
     * Its format is "projects/[projectId]/datasets/[bigquery_dataset_id]".
     * BigQuery Dataset unique ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_).
     */
    public val dataset: Output?
        get() = javaResource.dataset().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })

    /**
     * The description of the notification config (max of 1024 characters).
     */
    public val description: Output?
        get() = javaResource.description().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * Expression that defines the filter to apply across create/update
     * events of findings. The
     * expression is a list of zero or more restrictions combined via
     * logical operators AND and OR. Parentheses are supported, and OR
     * has higher precedence than AND.
     * Restrictions have the form    and may have
     * a - character in front of them to indicate negation. The fields
     * map to those defined in the corresponding resource.
     * The supported operators are:
     * * = for all value types.
     * * >, <, >=, <= for integer values.
     * * :, meaning substring matching, for strings.
     * The supported value types are:
     * * string literals in quotes.
     * * integer literals without quotes.
     * * boolean literals true and false without quotes.
     * See
     * [Filtering notifications](https://cloud.google.com/security-command-center/docs/how-to-api-filter-notifications)
     * for information on how to write a filter.
     */
    public val filter: Output?
        get() = javaResource.filter().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })

    /**
     * location Id is provided by organization. If not provided, Use global as default.
     */
    public val location: Output?
        get() = javaResource.location().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })

    /**
     * Email address of the user who last edited the BigQuery export.
     * This field is set by the server and will be ignored if provided on export creation or update.
     */
    public val mostRecentEditor: Output
        get() = javaResource.mostRecentEditor().applyValue({ args0 -> args0 })

    /**
     * The resource name of this export, in the format
     * `projects/{{project}}/locations/{{location}}/bigQueryExports/{{big_query_export_id}}`.
     * This field is provided in responses, and is ignored when provided in create requests.
     */
    public val name: Output
        get() = javaResource.name().applyValue({ args0 -> args0 })

    /**
     * The service account that needs permission to create table and upload data to the BigQuery dataset.
     */
    public val principal: Output
        get() = javaResource.principal().applyValue({ args0 -> args0 })

    /**
     * The ID of the project in which the resource belongs.
     * If it is not provided, the provider project is used.
     */
    public val project: Output
        get() = javaResource.project().applyValue({ args0 -> args0 })

    /**
     * The most recent time at which the BigQuery export was updated. This field is set by the server and will be ignored if provided on export creation or update.
     * A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits.
     * Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
     */
    public val updateTime: Output
        get() = javaResource.updateTime().applyValue({ args0 -> args0 })
}

public object V2ProjectSccBigQueryExportMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.gcp.securitycenter.V2ProjectSccBigQueryExport::class == javaResource::class

    override fun map(javaResource: Resource): V2ProjectSccBigQueryExport =
        V2ProjectSccBigQueryExport(
            javaResource as
                com.pulumi.gcp.securitycenter.V2ProjectSccBigQueryExport,
        )
}

/**
 * @see [V2ProjectSccBigQueryExport].
 * @param name The _unique_ name of the resulting resource.
 * @param block Builder for [V2ProjectSccBigQueryExport].
 */
public suspend fun v2ProjectSccBigQueryExport(
    name: String,
    block: suspend V2ProjectSccBigQueryExportResourceBuilder.() -> Unit,
): V2ProjectSccBigQueryExport {
    val builder = V2ProjectSccBigQueryExportResourceBuilder()
    builder.name(name)
    block(builder)
    return builder.build()
}

/**
 * @see [V2ProjectSccBigQueryExport].
 * @param name The _unique_ name of the resulting resource.
 */
public fun v2ProjectSccBigQueryExport(name: String): V2ProjectSccBigQueryExport {
    val builder = V2ProjectSccBigQueryExportResourceBuilder()
    builder.name(name)
    return builder.build()
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy