com.pulumi.awsnative.s3.kotlin.S3Functions.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.s3.kotlin
import com.pulumi.awsnative.s3.S3Functions.getAccessGrantPlain
import com.pulumi.awsnative.s3.S3Functions.getAccessGrantsInstancePlain
import com.pulumi.awsnative.s3.S3Functions.getAccessGrantsLocationPlain
import com.pulumi.awsnative.s3.S3Functions.getAccessPointPlain
import com.pulumi.awsnative.s3.S3Functions.getBucketPlain
import com.pulumi.awsnative.s3.S3Functions.getBucketPolicyPlain
import com.pulumi.awsnative.s3.S3Functions.getMultiRegionAccessPointPlain
import com.pulumi.awsnative.s3.S3Functions.getMultiRegionAccessPointPolicyPlain
import com.pulumi.awsnative.s3.S3Functions.getStorageLensGroupPlain
import com.pulumi.awsnative.s3.kotlin.inputs.GetAccessGrantPlainArgs
import com.pulumi.awsnative.s3.kotlin.inputs.GetAccessGrantPlainArgsBuilder
import com.pulumi.awsnative.s3.kotlin.inputs.GetAccessGrantsInstancePlainArgs
import com.pulumi.awsnative.s3.kotlin.inputs.GetAccessGrantsInstancePlainArgsBuilder
import com.pulumi.awsnative.s3.kotlin.inputs.GetAccessGrantsLocationPlainArgs
import com.pulumi.awsnative.s3.kotlin.inputs.GetAccessGrantsLocationPlainArgsBuilder
import com.pulumi.awsnative.s3.kotlin.inputs.GetAccessPointPlainArgs
import com.pulumi.awsnative.s3.kotlin.inputs.GetAccessPointPlainArgsBuilder
import com.pulumi.awsnative.s3.kotlin.inputs.GetBucketPlainArgs
import com.pulumi.awsnative.s3.kotlin.inputs.GetBucketPlainArgsBuilder
import com.pulumi.awsnative.s3.kotlin.inputs.GetBucketPolicyPlainArgs
import com.pulumi.awsnative.s3.kotlin.inputs.GetBucketPolicyPlainArgsBuilder
import com.pulumi.awsnative.s3.kotlin.inputs.GetMultiRegionAccessPointPlainArgs
import com.pulumi.awsnative.s3.kotlin.inputs.GetMultiRegionAccessPointPlainArgsBuilder
import com.pulumi.awsnative.s3.kotlin.inputs.GetMultiRegionAccessPointPolicyPlainArgs
import com.pulumi.awsnative.s3.kotlin.inputs.GetMultiRegionAccessPointPolicyPlainArgsBuilder
import com.pulumi.awsnative.s3.kotlin.inputs.GetStorageLensGroupPlainArgs
import com.pulumi.awsnative.s3.kotlin.inputs.GetStorageLensGroupPlainArgsBuilder
import com.pulumi.awsnative.s3.kotlin.outputs.GetAccessGrantResult
import com.pulumi.awsnative.s3.kotlin.outputs.GetAccessGrantsInstanceResult
import com.pulumi.awsnative.s3.kotlin.outputs.GetAccessGrantsLocationResult
import com.pulumi.awsnative.s3.kotlin.outputs.GetAccessPointResult
import com.pulumi.awsnative.s3.kotlin.outputs.GetBucketPolicyResult
import com.pulumi.awsnative.s3.kotlin.outputs.GetBucketResult
import com.pulumi.awsnative.s3.kotlin.outputs.GetMultiRegionAccessPointPolicyResult
import com.pulumi.awsnative.s3.kotlin.outputs.GetMultiRegionAccessPointResult
import com.pulumi.awsnative.s3.kotlin.outputs.GetStorageLensGroupResult
import kotlinx.coroutines.future.await
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import com.pulumi.awsnative.s3.kotlin.outputs.GetAccessGrantResult.Companion.toKotlin as getAccessGrantResultToKotlin
import com.pulumi.awsnative.s3.kotlin.outputs.GetAccessGrantsInstanceResult.Companion.toKotlin as getAccessGrantsInstanceResultToKotlin
import com.pulumi.awsnative.s3.kotlin.outputs.GetAccessGrantsLocationResult.Companion.toKotlin as getAccessGrantsLocationResultToKotlin
import com.pulumi.awsnative.s3.kotlin.outputs.GetAccessPointResult.Companion.toKotlin as getAccessPointResultToKotlin
import com.pulumi.awsnative.s3.kotlin.outputs.GetBucketPolicyResult.Companion.toKotlin as getBucketPolicyResultToKotlin
import com.pulumi.awsnative.s3.kotlin.outputs.GetBucketResult.Companion.toKotlin as getBucketResultToKotlin
import com.pulumi.awsnative.s3.kotlin.outputs.GetMultiRegionAccessPointPolicyResult.Companion.toKotlin as getMultiRegionAccessPointPolicyResultToKotlin
import com.pulumi.awsnative.s3.kotlin.outputs.GetMultiRegionAccessPointResult.Companion.toKotlin as getMultiRegionAccessPointResultToKotlin
import com.pulumi.awsnative.s3.kotlin.outputs.GetStorageLensGroupResult.Companion.toKotlin as getStorageLensGroupResultToKotlin
public object S3Functions {
/**
* The AWS::S3::AccessGrant resource is an Amazon S3 resource type representing permissions to a specific S3 bucket or prefix hosted in an S3 Access Grants instance.
* @param argument null
* @return null
*/
public suspend fun getAccessGrant(argument: GetAccessGrantPlainArgs): GetAccessGrantResult =
getAccessGrantResultToKotlin(getAccessGrantPlain(argument.toJava()).await())
/**
* @see [getAccessGrant].
* @param accessGrantId The ID assigned to this access grant.
* @return null
*/
public suspend fun getAccessGrant(accessGrantId: String): GetAccessGrantResult {
val argument = GetAccessGrantPlainArgs(
accessGrantId = accessGrantId,
)
return getAccessGrantResultToKotlin(getAccessGrantPlain(argument.toJava()).await())
}
/**
* @see [getAccessGrant].
* @param argument Builder for [com.pulumi.awsnative.s3.kotlin.inputs.GetAccessGrantPlainArgs].
* @return null
*/
public suspend fun getAccessGrant(argument: suspend GetAccessGrantPlainArgsBuilder.() -> Unit): GetAccessGrantResult {
val builder = GetAccessGrantPlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return getAccessGrantResultToKotlin(getAccessGrantPlain(builtArgument.toJava()).await())
}
/**
* The AWS::S3::AccessGrantsInstance resource is an Amazon S3 resource type that hosts Access Grants and their associated locations
* @param argument null
* @return null
*/
public suspend fun getAccessGrantsInstance(argument: GetAccessGrantsInstancePlainArgs): GetAccessGrantsInstanceResult =
getAccessGrantsInstanceResultToKotlin(getAccessGrantsInstancePlain(argument.toJava()).await())
/**
* @see [getAccessGrantsInstance].
* @param accessGrantsInstanceArn The Amazon Resource Name (ARN) of the specified Access Grants instance.
* @return null
*/
public suspend fun getAccessGrantsInstance(accessGrantsInstanceArn: String): GetAccessGrantsInstanceResult {
val argument = GetAccessGrantsInstancePlainArgs(
accessGrantsInstanceArn = accessGrantsInstanceArn,
)
return getAccessGrantsInstanceResultToKotlin(getAccessGrantsInstancePlain(argument.toJava()).await())
}
/**
* @see [getAccessGrantsInstance].
* @param argument Builder for [com.pulumi.awsnative.s3.kotlin.inputs.GetAccessGrantsInstancePlainArgs].
* @return null
*/
public suspend fun getAccessGrantsInstance(argument: suspend GetAccessGrantsInstancePlainArgsBuilder.() -> Unit): GetAccessGrantsInstanceResult {
val builder = GetAccessGrantsInstancePlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return getAccessGrantsInstanceResultToKotlin(getAccessGrantsInstancePlain(builtArgument.toJava()).await())
}
/**
* The AWS::S3::AccessGrantsLocation resource is an Amazon S3 resource type hosted in an access grants instance which can be the target of S3 access grants.
* @param argument null
* @return null
*/
public suspend fun getAccessGrantsLocation(argument: GetAccessGrantsLocationPlainArgs): GetAccessGrantsLocationResult =
getAccessGrantsLocationResultToKotlin(getAccessGrantsLocationPlain(argument.toJava()).await())
/**
* @see [getAccessGrantsLocation].
* @param accessGrantsLocationId The unique identifier for the specified Access Grants location.
* @return null
*/
public suspend fun getAccessGrantsLocation(accessGrantsLocationId: String): GetAccessGrantsLocationResult {
val argument = GetAccessGrantsLocationPlainArgs(
accessGrantsLocationId = accessGrantsLocationId,
)
return getAccessGrantsLocationResultToKotlin(getAccessGrantsLocationPlain(argument.toJava()).await())
}
/**
* @see [getAccessGrantsLocation].
* @param argument Builder for [com.pulumi.awsnative.s3.kotlin.inputs.GetAccessGrantsLocationPlainArgs].
* @return null
*/
public suspend fun getAccessGrantsLocation(argument: suspend GetAccessGrantsLocationPlainArgsBuilder.() -> Unit): GetAccessGrantsLocationResult {
val builder = GetAccessGrantsLocationPlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return getAccessGrantsLocationResultToKotlin(getAccessGrantsLocationPlain(builtArgument.toJava()).await())
}
/**
* The AWS::S3::AccessPoint resource is an Amazon S3 resource type that you can use to access buckets.
* @param argument null
* @return null
*/
public suspend fun getAccessPoint(argument: GetAccessPointPlainArgs): GetAccessPointResult =
getAccessPointResultToKotlin(getAccessPointPlain(argument.toJava()).await())
/**
* @see [getAccessPoint].
* @param name The name you want to assign to this Access Point. If you don't specify a name, AWS CloudFormation generates a unique ID and uses that ID for the access point name.
* @return null
*/
public suspend fun getAccessPoint(name: String): GetAccessPointResult {
val argument = GetAccessPointPlainArgs(
name = name,
)
return getAccessPointResultToKotlin(getAccessPointPlain(argument.toJava()).await())
}
/**
* @see [getAccessPoint].
* @param argument Builder for [com.pulumi.awsnative.s3.kotlin.inputs.GetAccessPointPlainArgs].
* @return null
*/
public suspend fun getAccessPoint(argument: suspend GetAccessPointPlainArgsBuilder.() -> Unit): GetAccessPointResult {
val builder = GetAccessPointPlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return getAccessPointResultToKotlin(getAccessPointPlain(builtArgument.toJava()).await())
}
/**
* The ``AWS::S3::Bucket`` resource creates an Amazon S3 bucket in the same AWS Region where you create the AWS CloudFormation stack.
* To control how AWS CloudFormation handles the bucket when the stack is deleted, you can set a deletion policy for your bucket. You can choose to *retain* the bucket or to *delete* the bucket. For more information, see [DeletionPolicy Attribute](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html).
* You can only delete empty buckets. Deletion fails for buckets that have contents.
* @param argument null
* @return null
*/
public suspend fun getBucket(argument: GetBucketPlainArgs): GetBucketResult =
getBucketResultToKotlin(getBucketPlain(argument.toJava()).await())
/**
* @see [getBucket].
* @param bucketName A name for the bucket. If you don't specify a name, AWS CloudFormation generates a unique ID and uses that ID for the bucket name. The bucket name must contain only lowercase letters, numbers, periods (.), and dashes (-) and must follow [Amazon S3 bucket restrictions and limitations](https://docs.aws.amazon.com/AmazonS3/latest/dev/BucketRestrictions.html). For more information, see [Rules for naming Amazon S3 buckets](https://docs.aws.amazon.com/AmazonS3/latest/dev/BucketRestrictions.html#bucketnamingrules) in the *Amazon S3 User Guide*.
* If you specify a name, you can't perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you need to replace the resource, specify a new name.
* @return null
*/
public suspend fun getBucket(bucketName: String): GetBucketResult {
val argument = GetBucketPlainArgs(
bucketName = bucketName,
)
return getBucketResultToKotlin(getBucketPlain(argument.toJava()).await())
}
/**
* @see [getBucket].
* @param argument Builder for [com.pulumi.awsnative.s3.kotlin.inputs.GetBucketPlainArgs].
* @return null
*/
public suspend fun getBucket(argument: suspend GetBucketPlainArgsBuilder.() -> Unit): GetBucketResult {
val builder = GetBucketPlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return getBucketResultToKotlin(getBucketPlain(builtArgument.toJava()).await())
}
/**
* Applies an Amazon S3 bucket policy to an Amazon S3 bucket. If you are using an identity other than the root user of the AWS-account that owns the bucket, the calling identity must have the ``PutBucketPolicy`` permissions on the specified bucket and belong to the bucket owner's account in order to use this operation.
* If you don't have ``PutBucketPolicy`` permissions, Amazon S3 returns a ``403 Access Denied`` error. If you have the correct permissions, but you're not using an identity that belongs to the bucket owner's account, Amazon S3 returns a ``405 Method Not Allowed`` error.
* As a security precaution, the root user of the AWS-account that owns a bucket can always use this operation, even if the policy explicitly denies the root user the ability to perform this action.
* For more information, see [Bucket policy examples](https://docs.aws.amazon.com/AmazonS3/latest/userguide/example-bucket-policies.html).
* The following operations are related to ``PutBucketPolicy``:
* + [CreateBucket](https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html)
* + [DeleteBucket](https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucket.html)
* @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 Amazon S3 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.s3.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())
}
/**
* AWS::S3::MultiRegionAccessPoint is an Amazon S3 resource type that dynamically routes S3 requests to easily satisfy geographic compliance requirements based on customer-defined routing policies.
* @param argument null
* @return null
*/
public suspend fun getMultiRegionAccessPoint(argument: GetMultiRegionAccessPointPlainArgs): GetMultiRegionAccessPointResult =
getMultiRegionAccessPointResultToKotlin(getMultiRegionAccessPointPlain(argument.toJava()).await())
/**
* @see [getMultiRegionAccessPoint].
* @param name The name you want to assign to this Multi Region Access Point.
* @return null
*/
public suspend fun getMultiRegionAccessPoint(name: String): GetMultiRegionAccessPointResult {
val argument = GetMultiRegionAccessPointPlainArgs(
name = name,
)
return getMultiRegionAccessPointResultToKotlin(getMultiRegionAccessPointPlain(argument.toJava()).await())
}
/**
* @see [getMultiRegionAccessPoint].
* @param argument Builder for [com.pulumi.awsnative.s3.kotlin.inputs.GetMultiRegionAccessPointPlainArgs].
* @return null
*/
public suspend fun getMultiRegionAccessPoint(argument: suspend GetMultiRegionAccessPointPlainArgsBuilder.() -> Unit): GetMultiRegionAccessPointResult {
val builder = GetMultiRegionAccessPointPlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return getMultiRegionAccessPointResultToKotlin(getMultiRegionAccessPointPlain(builtArgument.toJava()).await())
}
/**
* The policy to be attached to a Multi Region Access Point
* @param argument null
* @return null
*/
public suspend fun getMultiRegionAccessPointPolicy(argument: GetMultiRegionAccessPointPolicyPlainArgs): GetMultiRegionAccessPointPolicyResult =
getMultiRegionAccessPointPolicyResultToKotlin(getMultiRegionAccessPointPolicyPlain(argument.toJava()).await())
/**
* @see [getMultiRegionAccessPointPolicy].
* @param mrapName The name of the Multi Region Access Point to apply policy
* @return null
*/
public suspend fun getMultiRegionAccessPointPolicy(mrapName: String): GetMultiRegionAccessPointPolicyResult {
val argument = GetMultiRegionAccessPointPolicyPlainArgs(
mrapName = mrapName,
)
return getMultiRegionAccessPointPolicyResultToKotlin(getMultiRegionAccessPointPolicyPlain(argument.toJava()).await())
}
/**
* @see [getMultiRegionAccessPointPolicy].
* @param argument Builder for [com.pulumi.awsnative.s3.kotlin.inputs.GetMultiRegionAccessPointPolicyPlainArgs].
* @return null
*/
public suspend fun getMultiRegionAccessPointPolicy(argument: suspend GetMultiRegionAccessPointPolicyPlainArgsBuilder.() -> Unit): GetMultiRegionAccessPointPolicyResult {
val builder = GetMultiRegionAccessPointPolicyPlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return getMultiRegionAccessPointPolicyResultToKotlin(getMultiRegionAccessPointPolicyPlain(builtArgument.toJava()).await())
}
/**
* The AWS::S3::StorageLensGroup resource is an Amazon S3 resource type that you can use to create Storage Lens Group.
* @param argument null
* @return null
*/
public suspend fun getStorageLensGroup(argument: GetStorageLensGroupPlainArgs): GetStorageLensGroupResult =
getStorageLensGroupResultToKotlin(getStorageLensGroupPlain(argument.toJava()).await())
/**
* @see [getStorageLensGroup].
* @param name This property contains the Storage Lens group name.
* @return null
*/
public suspend fun getStorageLensGroup(name: String): GetStorageLensGroupResult {
val argument = GetStorageLensGroupPlainArgs(
name = name,
)
return getStorageLensGroupResultToKotlin(getStorageLensGroupPlain(argument.toJava()).await())
}
/**
* @see [getStorageLensGroup].
* @param argument Builder for [com.pulumi.awsnative.s3.kotlin.inputs.GetStorageLensGroupPlainArgs].
* @return null
*/
public suspend fun getStorageLensGroup(argument: suspend GetStorageLensGroupPlainArgsBuilder.() -> Unit): GetStorageLensGroupResult {
val builder = GetStorageLensGroupPlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return getStorageLensGroupResultToKotlin(getStorageLensGroupPlain(builtArgument.toJava()).await())
}
}