com.pulumi.gcp.securitycenter.kotlin.SourceIamMember.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.securitycenter.kotlin
import com.pulumi.core.Output
import com.pulumi.gcp.securitycenter.kotlin.outputs.SourceIamMemberCondition
import com.pulumi.gcp.securitycenter.kotlin.outputs.SourceIamMemberCondition.Companion.toKotlin
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 [SourceIamMember].
*/
@PulumiTagMarker
public class SourceIamMemberResourceBuilder internal constructor() {
public var name: String? = null
public var args: SourceIamMemberArgs = SourceIamMemberArgs()
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 SourceIamMemberArgsBuilder.() -> Unit) {
val builder = SourceIamMemberArgsBuilder()
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(): SourceIamMember {
val builtJavaResource = com.pulumi.gcp.securitycenter.SourceIamMember(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return SourceIamMember(builtJavaResource)
}
}
/**
* A Cloud Security Command Center's (Cloud SCC) finding source. A finding
* source is an entity or a mechanism that can produce a finding. A source is
* like a container of findings that come from the same scanner, logger,
* monitor, etc.
* To get more information about Source, see:
* * [API documentation](https://cloud.google.com/security-command-center/docs/reference/rest/v1/organizations.sources)
* * How-to Guides
* * [Official Documentation](https://cloud.google.com/security-command-center/docs)
* ## Example Usage
* ### Scc Source Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const customSource = new gcp.securitycenter.Source("custom_source", {
* displayName: "My Source",
* organization: "123456789",
* description: "My custom Cloud Security Command Center Finding Source",
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* custom_source = gcp.securitycenter.Source("custom_source",
* display_name="My Source",
* organization="123456789",
* description="My custom Cloud Security Command Center Finding Source")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var customSource = new Gcp.SecurityCenter.Source("custom_source", new()
* {
* DisplayName = "My Source",
* Organization = "123456789",
* Description = "My custom Cloud Security Command Center Finding Source",
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/securitycenter"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := securitycenter.NewSource(ctx, "custom_source", &securitycenter.SourceArgs{
* DisplayName: pulumi.String("My Source"),
* Organization: pulumi.String("123456789"),
* Description: pulumi.String("My custom Cloud Security Command Center Finding Source"),
* })
* 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.securitycenter.Source;
* import com.pulumi.gcp.securitycenter.SourceArgs;
* 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 customSource = new Source("customSource", SourceArgs.builder()
* .displayName("My Source")
* .organization("123456789")
* .description("My custom Cloud Security Command Center Finding Source")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* customSource:
* type: gcp:securitycenter:Source
* name: custom_source
* properties:
* displayName: My Source
* organization: '123456789'
* description: My custom Cloud Security Command Center Finding Source
* ```
*
* ## Import
* Source can be imported using any of these accepted formats:
* * `organizations/{{organization}}/sources/{{name}}`
* * `{{organization}}/{{name}}`
* When using the `pulumi import` command, Source can be imported using one of the formats above. For example:
* ```sh
* $ pulumi import gcp:securitycenter/sourceIamMember:SourceIamMember default organizations/{{organization}}/sources/{{name}}
* ```
* ```sh
* $ pulumi import gcp:securitycenter/sourceIamMember:SourceIamMember default {{organization}}/{{name}}
* ```
*/
public class SourceIamMember internal constructor(
override val javaResource: com.pulumi.gcp.securitycenter.SourceIamMember,
) : KotlinCustomResource(javaResource, SourceIamMemberMapper) {
public val condition: Output?
get() = javaResource.condition().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
toKotlin(args0)
})
}).orElse(null)
})
public val etag: Output
get() = javaResource.etag().applyValue({ args0 -> args0 })
public val member: Output
get() = javaResource.member().applyValue({ args0 -> args0 })
/**
* The organization whose Cloud Security Command Center the Source
* lives in.
* - - -
*/
public val organization: Output
get() = javaResource.organization().applyValue({ args0 -> args0 })
public val role: Output
get() = javaResource.role().applyValue({ args0 -> args0 })
public val source: Output
get() = javaResource.source().applyValue({ args0 -> args0 })
}
public object SourceIamMemberMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.gcp.securitycenter.SourceIamMember::class == javaResource::class
override fun map(javaResource: Resource): SourceIamMember = SourceIamMember(
javaResource as
com.pulumi.gcp.securitycenter.SourceIamMember,
)
}
/**
* @see [SourceIamMember].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [SourceIamMember].
*/
public suspend fun sourceIamMember(
name: String,
block: suspend SourceIamMemberResourceBuilder.() -> Unit,
): SourceIamMember {
val builder = SourceIamMemberResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [SourceIamMember].
* @param name The _unique_ name of the resulting resource.
*/
public fun sourceIamMember(name: String): SourceIamMember {
val builder = SourceIamMemberResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy