com.pulumi.awsnative.s3express.kotlin.S3expressFunctions.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-aws-native-kotlin Show documentation
Show all versions of pulumi-aws-native-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.awsnative.s3express.kotlin
import com.pulumi.awsnative.s3express.S3expressFunctions.getBucketPolicyPlain
import com.pulumi.awsnative.s3express.S3expressFunctions.getDirectoryBucketPlain
import com.pulumi.awsnative.s3express.kotlin.inputs.GetBucketPolicyPlainArgs
import com.pulumi.awsnative.s3express.kotlin.inputs.GetBucketPolicyPlainArgsBuilder
import com.pulumi.awsnative.s3express.kotlin.inputs.GetDirectoryBucketPlainArgs
import com.pulumi.awsnative.s3express.kotlin.inputs.GetDirectoryBucketPlainArgsBuilder
import com.pulumi.awsnative.s3express.kotlin.outputs.GetBucketPolicyResult
import com.pulumi.awsnative.s3express.kotlin.outputs.GetDirectoryBucketResult
import kotlinx.coroutines.future.await
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import com.pulumi.awsnative.s3express.kotlin.outputs.GetBucketPolicyResult.Companion.toKotlin as getBucketPolicyResultToKotlin
import com.pulumi.awsnative.s3express.kotlin.outputs.GetDirectoryBucketResult.Companion.toKotlin as getDirectoryBucketResultToKotlin
public object S3expressFunctions {
/**
* Resource Type definition for AWS::S3Express::BucketPolicy.
* @param argument null
* @return null
*/
public suspend fun getBucketPolicy(argument: GetBucketPolicyPlainArgs): GetBucketPolicyResult =
getBucketPolicyResultToKotlin(getBucketPolicyPlain(argument.toJava()).await())
/**
* @see [getBucketPolicy].
* @param bucket The name of the S3 directory bucket to which the policy applies.
* @return null
*/
public suspend fun getBucketPolicy(bucket: String): GetBucketPolicyResult {
val argument = GetBucketPolicyPlainArgs(
bucket = bucket,
)
return getBucketPolicyResultToKotlin(getBucketPolicyPlain(argument.toJava()).await())
}
/**
* @see [getBucketPolicy].
* @param argument Builder for [com.pulumi.awsnative.s3express.kotlin.inputs.GetBucketPolicyPlainArgs].
* @return null
*/
public suspend fun getBucketPolicy(argument: suspend GetBucketPolicyPlainArgsBuilder.() -> Unit): GetBucketPolicyResult {
val builder = GetBucketPolicyPlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return getBucketPolicyResultToKotlin(getBucketPolicyPlain(builtArgument.toJava()).await())
}
/**
* Resource Type definition for AWS::S3Express::DirectoryBucket.
* @param argument null
* @return null
*/
public suspend fun getDirectoryBucket(argument: GetDirectoryBucketPlainArgs): GetDirectoryBucketResult =
getDirectoryBucketResultToKotlin(getDirectoryBucketPlain(argument.toJava()).await())
/**
* @see [getDirectoryBucket].
* @param bucketName Specifies a name for the bucket. The bucket name must contain only lowercase letters, numbers, and hyphens (-). A directory bucket name must be unique in the chosen Availability Zone. The bucket name must also follow the format 'bucket_base_name--az_id--x-s3' (for example, 'DOC-EXAMPLE-BUCKET--usw2-az1--x-s3'). If you don't specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the bucket name.
* @return null
*/
public suspend fun getDirectoryBucket(bucketName: String): GetDirectoryBucketResult {
val argument = GetDirectoryBucketPlainArgs(
bucketName = bucketName,
)
return getDirectoryBucketResultToKotlin(getDirectoryBucketPlain(argument.toJava()).await())
}
/**
* @see [getDirectoryBucket].
* @param argument Builder for [com.pulumi.awsnative.s3express.kotlin.inputs.GetDirectoryBucketPlainArgs].
* @return null
*/
public suspend fun getDirectoryBucket(argument: suspend GetDirectoryBucketPlainArgsBuilder.() -> Unit): GetDirectoryBucketResult {
val builder = GetDirectoryBucketPlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return getDirectoryBucketResultToKotlin(getDirectoryBucketPlain(builtArgument.toJava()).await())
}
}