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

cloudshift.awscdk.dsl.services.quicksight.CfnDataSourceResourcePermissionPropertyDsl.kt Maven / Gradle / Ivy

There is a newer version: 0.7.0
Show newest version
@file:Suppress("RedundantVisibilityModifier", "RedundantUnitReturnType", "RemoveRedundantQualifierName", "unused", "UnusedImport", "ClassName", "REDUNDANT_PROJECTION", "DEPRECATION")

package cloudshift.awscdk.dsl.services.quicksight

import cloudshift.awscdk.common.CdkDslMarker
import software.amazon.awscdk.services.quicksight.CfnDataSource
import kotlin.String
import kotlin.collections.Collection
import kotlin.collections.MutableList

/**
 * Permission for the resource.
 *
 * Example:
 *
 * ```
 * // The code below shows an example of how to instantiate this type.
 * // The values are placeholders you should change.
 * import software.amazon.awscdk.services.quicksight.*;
 * ResourcePermissionProperty resourcePermissionProperty = ResourcePermissionProperty.builder()
 * .actions(List.of("actions"))
 * .principal("principal")
 * .build();
 * ```
 *
 * [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-datasource-resourcepermission.html)
 */
@CdkDslMarker
public class CfnDataSourceResourcePermissionPropertyDsl {
    private val cdkBuilder: CfnDataSource.ResourcePermissionProperty.Builder =
        CfnDataSource.ResourcePermissionProperty.builder()

    private val _actions: MutableList = mutableListOf()

    /**
     * @param actions The IAM action to grant or revoke permissions on.
     */
    public fun actions(vararg actions: String) {
        _actions.addAll(listOf(*actions))
    }

    /**
     * @param actions The IAM action to grant or revoke permissions on.
     */
    public fun actions(actions: Collection) {
        _actions.addAll(actions)
    }

    /**
     * @param principal The Amazon Resource Name (ARN) of the principal. This can be one of the
     * following:.
     * * The ARN of an Amazon QuickSight user or group associated with a data source or dataset. (This
     * is common.)
     * * The ARN of an Amazon QuickSight user, group, or namespace associated with an analysis,
     * dashboard, template, or theme. (This is common.)
     * * The ARN of an AWS account root: This is an IAM ARN rather than a Amazon QuickSight ARN. Use
     * this option only to share resources (templates) across AWS accounts . (This is less common.)
     */
    public fun principal(principal: String) {
        cdkBuilder.principal(principal)
    }

    public fun build(): CfnDataSource.ResourcePermissionProperty {
        if (_actions.isNotEmpty()) cdkBuilder.actions(_actions)
        return cdkBuilder.build()
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy