
com.pulumi.gcp.securitycenter.kotlin.ManagementOrganizationEventThreatDetectionCustomModule.kt Maven / Gradle / Ivy
@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 [ManagementOrganizationEventThreatDetectionCustomModule].
*/
@PulumiTagMarker
public class ManagementOrganizationEventThreatDetectionCustomModuleResourceBuilder internal constructor() {
public var name: String? = null
public var args: ManagementOrganizationEventThreatDetectionCustomModuleArgs =
ManagementOrganizationEventThreatDetectionCustomModuleArgs()
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 ManagementOrganizationEventThreatDetectionCustomModuleArgsBuilder.() -> Unit) {
val builder = ManagementOrganizationEventThreatDetectionCustomModuleArgsBuilder()
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(): ManagementOrganizationEventThreatDetectionCustomModule {
val builtJavaResource =
com.pulumi.gcp.securitycenter.ManagementOrganizationEventThreatDetectionCustomModule(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return ManagementOrganizationEventThreatDetectionCustomModule(builtJavaResource)
}
}
/**
* Represents an instance of an Event Threat Detection custom module, including
* its full module name, display name, enablement state, and last updated time.
* You can create a custom module at the organization level only.
* To get more information about OrganizationEventThreatDetectionCustomModule, see:
* * [API documentation](https://cloud.google.com/security-command-center/docs/reference/security-center-management/rest/v1/organizations.locations.eventThreatDetectionCustomModules)
* * How-to Guides
* * [Overview of custom modules for Event Threat Detection](https://cloud.google.com/security-command-center/docs/custom-modules-etd-overview)
* ## Example Usage
* ### Scc Management Organization Event Threat Detection Custom Module
*
* ```yaml
* resources:
* example:
* type: gcp:securitycenter:ManagementOrganizationEventThreatDetectionCustomModule
* properties:
* organization: '123456789'
* location: global
* displayName: basic_custom_module
* enablementState: ENABLED
* type: CONFIGURABLE_BAD_IP
* description: My Event Threat Detection Custom Module
* config:
* fn::toJSON:
* metadata:
* severity: LOW
* description: Flagged by Forcepoint as malicious
* recommendation: Contact the owner of the relevant project.
* ips:
* - 192.0.2.1
* - 192.0.2.0/24
* ```
*
* ## Import
* OrganizationEventThreatDetectionCustomModule can be imported using any of these accepted formats:
* * `organizations/{{organization}}/locations/{{location}}/eventThreatDetectionCustomModules/{{name}}`
* * `{{organization}}/{{location}}/{{name}}`
* When using the `pulumi import` command, OrganizationEventThreatDetectionCustomModule can be imported using one of the formats above. For example:
* ```sh
* $ pulumi import gcp:securitycenter/managementOrganizationEventThreatDetectionCustomModule:ManagementOrganizationEventThreatDetectionCustomModule default organizations/{{organization}}/locations/{{location}}/eventThreatDetectionCustomModules/{{name}}
* ```
* ```sh
* $ pulumi import gcp:securitycenter/managementOrganizationEventThreatDetectionCustomModule:ManagementOrganizationEventThreatDetectionCustomModule default {{organization}}/{{location}}/{{name}}
* ```
*/
public class ManagementOrganizationEventThreatDetectionCustomModule internal constructor(
override val javaResource: com.pulumi.gcp.securitycenter.ManagementOrganizationEventThreatDetectionCustomModule,
) : KotlinCustomResource(javaResource, ManagementOrganizationEventThreatDetectionCustomModuleMapper) {
/**
* Config for the module. For the resident module, its config value is defined at this level.
* For the inherited module, its config value is inherited from the ancestor module.
*/
public val config: Output?
get() = javaResource.config().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* The human readable name to be displayed for the module.
*/
public val displayName: Output?
get() = javaResource.displayName().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The state of enablement for the module at the given level of the hierarchy.
* Possible values are: `ENABLED`, `DISABLED`.
*/
public val enablementState: Output?
get() = javaResource.enablementState().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The editor that last updated the custom module
*/
public val lastEditor: Output
get() = javaResource.lastEditor().applyValue({ args0 -> args0 })
/**
* Location ID of the parent organization. Only global is supported at the moment.
*/
public val location: Output?
get() = javaResource.location().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* The resource name of the Event Threat Detection custom module.
* Its format is "organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{eventThreatDetectionCustomModule}".
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* Numerical ID of the parent organization.
* - - -
*/
public val organization: Output
get() = javaResource.organization().applyValue({ args0 -> args0 })
/**
* Immutable. Type for the module. e.g. CONFIGURABLE_BAD_IP.
*/
public val type: Output?
get() = javaResource.type().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* The time at which the custom module was last updated.
* 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 ManagementOrganizationEventThreatDetectionCustomModuleMapper :
ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.gcp.securitycenter.ManagementOrganizationEventThreatDetectionCustomModule::class == javaResource::class
override fun map(javaResource: Resource): ManagementOrganizationEventThreatDetectionCustomModule =
ManagementOrganizationEventThreatDetectionCustomModule(
javaResource as
com.pulumi.gcp.securitycenter.ManagementOrganizationEventThreatDetectionCustomModule,
)
}
/**
* @see [ManagementOrganizationEventThreatDetectionCustomModule].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [ManagementOrganizationEventThreatDetectionCustomModule].
*/
public suspend fun managementOrganizationEventThreatDetectionCustomModule(
name: String,
block: suspend ManagementOrganizationEventThreatDetectionCustomModuleResourceBuilder.() -> Unit,
): ManagementOrganizationEventThreatDetectionCustomModule {
val builder = ManagementOrganizationEventThreatDetectionCustomModuleResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [ManagementOrganizationEventThreatDetectionCustomModule].
* @param name The _unique_ name of the resulting resource.
*/
public fun managementOrganizationEventThreatDetectionCustomModule(name: String): ManagementOrganizationEventThreatDetectionCustomModule {
val builder = ManagementOrganizationEventThreatDetectionCustomModuleResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy