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

com.pulumi.awsnative.cloudtrail.kotlin.CloudtrailFunctions.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: 1.11.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.cloudtrail.kotlin

import com.pulumi.awsnative.cloudtrail.CloudtrailFunctions.getChannelPlain
import com.pulumi.awsnative.cloudtrail.CloudtrailFunctions.getEventDataStorePlain
import com.pulumi.awsnative.cloudtrail.CloudtrailFunctions.getResourcePolicyPlain
import com.pulumi.awsnative.cloudtrail.CloudtrailFunctions.getTrailPlain
import com.pulumi.awsnative.cloudtrail.kotlin.inputs.GetChannelPlainArgs
import com.pulumi.awsnative.cloudtrail.kotlin.inputs.GetChannelPlainArgsBuilder
import com.pulumi.awsnative.cloudtrail.kotlin.inputs.GetEventDataStorePlainArgs
import com.pulumi.awsnative.cloudtrail.kotlin.inputs.GetEventDataStorePlainArgsBuilder
import com.pulumi.awsnative.cloudtrail.kotlin.inputs.GetResourcePolicyPlainArgs
import com.pulumi.awsnative.cloudtrail.kotlin.inputs.GetResourcePolicyPlainArgsBuilder
import com.pulumi.awsnative.cloudtrail.kotlin.inputs.GetTrailPlainArgs
import com.pulumi.awsnative.cloudtrail.kotlin.inputs.GetTrailPlainArgsBuilder
import com.pulumi.awsnative.cloudtrail.kotlin.outputs.GetChannelResult
import com.pulumi.awsnative.cloudtrail.kotlin.outputs.GetEventDataStoreResult
import com.pulumi.awsnative.cloudtrail.kotlin.outputs.GetResourcePolicyResult
import com.pulumi.awsnative.cloudtrail.kotlin.outputs.GetTrailResult
import kotlinx.coroutines.future.await
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import com.pulumi.awsnative.cloudtrail.kotlin.outputs.GetChannelResult.Companion.toKotlin as getChannelResultToKotlin
import com.pulumi.awsnative.cloudtrail.kotlin.outputs.GetEventDataStoreResult.Companion.toKotlin as getEventDataStoreResultToKotlin
import com.pulumi.awsnative.cloudtrail.kotlin.outputs.GetResourcePolicyResult.Companion.toKotlin as getResourcePolicyResultToKotlin
import com.pulumi.awsnative.cloudtrail.kotlin.outputs.GetTrailResult.Companion.toKotlin as getTrailResultToKotlin

public object CloudtrailFunctions {
    /**
     * A channel receives events from a specific source (such as an on-premises storage solution or application, or a partner event data source), and delivers the events to one or more event data stores. You use channels to ingest events into CloudTrail from sources outside AWS.
     * @param argument null
     * @return null
     */
    public suspend fun getChannel(argument: GetChannelPlainArgs): GetChannelResult =
        getChannelResultToKotlin(getChannelPlain(argument.toJava()).await())

    /**
     * @see [getChannel].
     * @param channelArn `Ref` returns the ARN of the CloudTrail channel, such as `arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890` .
     * @return null
     */
    public suspend fun getChannel(channelArn: String): GetChannelResult {
        val argument = GetChannelPlainArgs(
            channelArn = channelArn,
        )
        return getChannelResultToKotlin(getChannelPlain(argument.toJava()).await())
    }

    /**
     * @see [getChannel].
     * @param argument Builder for [com.pulumi.awsnative.cloudtrail.kotlin.inputs.GetChannelPlainArgs].
     * @return null
     */
    public suspend fun getChannel(argument: suspend GetChannelPlainArgsBuilder.() -> Unit): GetChannelResult {
        val builder = GetChannelPlainArgsBuilder()
        builder.argument()
        val builtArgument = builder.build()
        return getChannelResultToKotlin(getChannelPlain(builtArgument.toJava()).await())
    }

    /**
     * A storage lake of event data against which you can run complex SQL-based queries. An event data store can include events that you have logged on your account from the last 7 to 2557 or 3653 days (about seven or ten years) depending on the selected BillingMode.
     * @param argument null
     * @return null
     */
    public suspend fun getEventDataStore(argument: GetEventDataStorePlainArgs): GetEventDataStoreResult =
        getEventDataStoreResultToKotlin(getEventDataStorePlain(argument.toJava()).await())

    /**
     * @see [getEventDataStore].
     * @param eventDataStoreArn The ARN of the event data store.
     * @return null
     */
    public suspend fun getEventDataStore(eventDataStoreArn: String): GetEventDataStoreResult {
        val argument = GetEventDataStorePlainArgs(
            eventDataStoreArn = eventDataStoreArn,
        )
        return getEventDataStoreResultToKotlin(getEventDataStorePlain(argument.toJava()).await())
    }

    /**
     * @see [getEventDataStore].
     * @param argument Builder for [com.pulumi.awsnative.cloudtrail.kotlin.inputs.GetEventDataStorePlainArgs].
     * @return null
     */
    public suspend fun getEventDataStore(argument: suspend GetEventDataStorePlainArgsBuilder.() -> Unit): GetEventDataStoreResult {
        val builder = GetEventDataStorePlainArgsBuilder()
        builder.argument()
        val builtArgument = builder.build()
        return getEventDataStoreResultToKotlin(getEventDataStorePlain(builtArgument.toJava()).await())
    }

    /**
     * Resource Type definition for AWS::CloudTrail::ResourcePolicy
     * @param argument null
     * @return null
     */
    public suspend fun getResourcePolicy(argument: GetResourcePolicyPlainArgs): GetResourcePolicyResult =
        getResourcePolicyResultToKotlin(getResourcePolicyPlain(argument.toJava()).await())

    /**
     * @see [getResourcePolicy].
     * @param resourceArn The ARN of the AWS CloudTrail resource to which the policy applies.
     * @return null
     */
    public suspend fun getResourcePolicy(resourceArn: String): GetResourcePolicyResult {
        val argument = GetResourcePolicyPlainArgs(
            resourceArn = resourceArn,
        )
        return getResourcePolicyResultToKotlin(getResourcePolicyPlain(argument.toJava()).await())
    }

    /**
     * @see [getResourcePolicy].
     * @param argument Builder for [com.pulumi.awsnative.cloudtrail.kotlin.inputs.GetResourcePolicyPlainArgs].
     * @return null
     */
    public suspend fun getResourcePolicy(argument: suspend GetResourcePolicyPlainArgsBuilder.() -> Unit): GetResourcePolicyResult {
        val builder = GetResourcePolicyPlainArgsBuilder()
        builder.argument()
        val builtArgument = builder.build()
        return getResourcePolicyResultToKotlin(getResourcePolicyPlain(builtArgument.toJava()).await())
    }

    /**
     * Creates a trail that specifies the settings for delivery of log data to an Amazon S3 bucket. A maximum of five trails can exist in a region, irrespective of the region in which they were created.
     * @param argument null
     * @return null
     */
    public suspend fun getTrail(argument: GetTrailPlainArgs): GetTrailResult =
        getTrailResultToKotlin(getTrailPlain(argument.toJava()).await())

    /**
     * @see [getTrail].
     * @param trailName Specifies the name of the trail. The name must meet the following requirements:
     * - Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_), or dashes (-)
     * - Start with a letter or number, and end with a letter or number
     * - Be between 3 and 128 characters
     * - Have no adjacent periods, underscores or dashes. Names like `my-_namespace` and `my--namespace` are not valid.
     * - Not be in IP address format (for example, 192.168.5.4)
     * @return null
     */
    public suspend fun getTrail(trailName: String): GetTrailResult {
        val argument = GetTrailPlainArgs(
            trailName = trailName,
        )
        return getTrailResultToKotlin(getTrailPlain(argument.toJava()).await())
    }

    /**
     * @see [getTrail].
     * @param argument Builder for [com.pulumi.awsnative.cloudtrail.kotlin.inputs.GetTrailPlainArgs].
     * @return null
     */
    public suspend fun getTrail(argument: suspend GetTrailPlainArgsBuilder.() -> Unit): GetTrailResult {
        val builder = GetTrailPlainArgsBuilder()
        builder.argument()
        val builtArgument = builder.build()
        return getTrailResultToKotlin(getTrailPlain(builtArgument.toJava()).await())
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy