![JAR search and dependency download from the Maven repository](/logo.png)
io.cloudshiftdev.awscdk.services.iam.CfnUserPolicyProps.kt Maven / Gradle / Ivy
@file:Suppress("RedundantVisibilityModifier","RedundantUnitReturnType","RemoveRedundantQualifierName","unused","UnusedImport","ClassName","REDUNDANT_PROJECTION","DEPRECATION")
package io.cloudshiftdev.awscdk.services.iam
import io.cloudshiftdev.awscdk.common.CdkDslMarker
import io.cloudshiftdev.awscdk.common.CdkObject
import io.cloudshiftdev.awscdk.common.CdkObjectWrappers
import kotlin.Any
import kotlin.String
import kotlin.Unit
/**
* Properties for defining a `CfnUserPolicy`.
*
* Example:
*
* ```
* // The code below shows an example of how to instantiate this type.
* // The values are placeholders you should change.
* import io.cloudshiftdev.awscdk.services.iam.*;
* Object policyDocument;
* CfnUserPolicyProps cfnUserPolicyProps = CfnUserPolicyProps.builder()
* .policyName("policyName")
* .userName("userName")
* // the properties below are optional
* .policyDocument(policyDocument)
* .build();
* ```
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-userpolicy.html)
*/
public interface CfnUserPolicyProps {
/**
* The policy document.
*
* You must provide policies in JSON format in IAM. However, for AWS CloudFormation templates
* formatted in YAML, you can provide the policy in JSON or YAML format. AWS CloudFormation always
* converts a YAML policy to JSON format before submitting it to IAM.
*
* The [regex pattern](https://docs.aws.amazon.com/http://wikipedia.org/wiki/regex) used to
* validate this parameter is a string of characters consisting of the following:
*
* * Any printable ASCII character ranging from the space character ( `\u0020` ) through the end
* of the ASCII character range
* * The printable characters in the Basic Latin and Latin-1 Supplement character set (through
* `\u00FF` )
* * The special characters tab ( `\u0009` ), line feed ( `\u000A` ), and carriage return (
* `\u000D` )
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-userpolicy.html#cfn-iam-userpolicy-policydocument)
*/
public fun policyDocument(): Any? = unwrap(this).getPolicyDocument()
/**
* The name of the policy document.
*
* This parameter allows (through its [regex
* pattern](https://docs.aws.amazon.com/http://wikipedia.org/wiki/regex) ) a string of characters
* consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any
* of the following characters: _+=,.@-
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-userpolicy.html#cfn-iam-userpolicy-policyname)
*/
public fun policyName(): String
/**
* The name of the user to associate the policy with.
*
* This parameter allows (through its [regex
* pattern](https://docs.aws.amazon.com/http://wikipedia.org/wiki/regex) ) a string of characters
* consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any
* of the following characters: _+=,.@-
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-userpolicy.html#cfn-iam-userpolicy-username)
*/
public fun userName(): String
/**
* A builder for [CfnUserPolicyProps]
*/
@CdkDslMarker
public interface Builder {
/**
* @param policyDocument The policy document.
* You must provide policies in JSON format in IAM. However, for AWS CloudFormation templates
* formatted in YAML, you can provide the policy in JSON or YAML format. AWS CloudFormation always
* converts a YAML policy to JSON format before submitting it to IAM.
*
* The [regex pattern](https://docs.aws.amazon.com/http://wikipedia.org/wiki/regex) used to
* validate this parameter is a string of characters consisting of the following:
*
* * Any printable ASCII character ranging from the space character ( `\u0020` ) through the end
* of the ASCII character range
* * The printable characters in the Basic Latin and Latin-1 Supplement character set (through
* `\u00FF` )
* * The special characters tab ( `\u0009` ), line feed ( `\u000A` ), and carriage return (
* `\u000D` )
*/
public fun policyDocument(policyDocument: Any)
/**
* @param policyName The name of the policy document.
* This parameter allows (through its [regex
* pattern](https://docs.aws.amazon.com/http://wikipedia.org/wiki/regex) ) a string of characters
* consisting of upper and lowercase alphanumeric characters with no spaces. You can also include
* any of the following characters: _+=,.@-
*/
public fun policyName(policyName: String)
/**
* @param userName The name of the user to associate the policy with.
* This parameter allows (through its [regex
* pattern](https://docs.aws.amazon.com/http://wikipedia.org/wiki/regex) ) a string of characters
* consisting of upper and lowercase alphanumeric characters with no spaces. You can also include
* any of the following characters: _+=,.@-
*/
public fun userName(userName: String)
}
private class BuilderImpl : Builder {
private val cdkBuilder: software.amazon.awscdk.services.iam.CfnUserPolicyProps.Builder =
software.amazon.awscdk.services.iam.CfnUserPolicyProps.builder()
/**
* @param policyDocument The policy document.
* You must provide policies in JSON format in IAM. However, for AWS CloudFormation templates
* formatted in YAML, you can provide the policy in JSON or YAML format. AWS CloudFormation always
* converts a YAML policy to JSON format before submitting it to IAM.
*
* The [regex pattern](https://docs.aws.amazon.com/http://wikipedia.org/wiki/regex) used to
* validate this parameter is a string of characters consisting of the following:
*
* * Any printable ASCII character ranging from the space character ( `\u0020` ) through the end
* of the ASCII character range
* * The printable characters in the Basic Latin and Latin-1 Supplement character set (through
* `\u00FF` )
* * The special characters tab ( `\u0009` ), line feed ( `\u000A` ), and carriage return (
* `\u000D` )
*/
override fun policyDocument(policyDocument: Any) {
cdkBuilder.policyDocument(policyDocument)
}
/**
* @param policyName The name of the policy document.
* This parameter allows (through its [regex
* pattern](https://docs.aws.amazon.com/http://wikipedia.org/wiki/regex) ) a string of characters
* consisting of upper and lowercase alphanumeric characters with no spaces. You can also include
* any of the following characters: _+=,.@-
*/
override fun policyName(policyName: String) {
cdkBuilder.policyName(policyName)
}
/**
* @param userName The name of the user to associate the policy with.
* This parameter allows (through its [regex
* pattern](https://docs.aws.amazon.com/http://wikipedia.org/wiki/regex) ) a string of characters
* consisting of upper and lowercase alphanumeric characters with no spaces. You can also include
* any of the following characters: _+=,.@-
*/
override fun userName(userName: String) {
cdkBuilder.userName(userName)
}
public fun build(): software.amazon.awscdk.services.iam.CfnUserPolicyProps = cdkBuilder.build()
}
private class Wrapper(
cdkObject: software.amazon.awscdk.services.iam.CfnUserPolicyProps,
) : CdkObject(cdkObject),
CfnUserPolicyProps {
/**
* The policy document.
*
* You must provide policies in JSON format in IAM. However, for AWS CloudFormation templates
* formatted in YAML, you can provide the policy in JSON or YAML format. AWS CloudFormation always
* converts a YAML policy to JSON format before submitting it to IAM.
*
* The [regex pattern](https://docs.aws.amazon.com/http://wikipedia.org/wiki/regex) used to
* validate this parameter is a string of characters consisting of the following:
*
* * Any printable ASCII character ranging from the space character ( `\u0020` ) through the end
* of the ASCII character range
* * The printable characters in the Basic Latin and Latin-1 Supplement character set (through
* `\u00FF` )
* * The special characters tab ( `\u0009` ), line feed ( `\u000A` ), and carriage return (
* `\u000D` )
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-userpolicy.html#cfn-iam-userpolicy-policydocument)
*/
override fun policyDocument(): Any? = unwrap(this).getPolicyDocument()
/**
* The name of the policy document.
*
* This parameter allows (through its [regex
* pattern](https://docs.aws.amazon.com/http://wikipedia.org/wiki/regex) ) a string of characters
* consisting of upper and lowercase alphanumeric characters with no spaces. You can also include
* any of the following characters: _+=,.@-
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-userpolicy.html#cfn-iam-userpolicy-policyname)
*/
override fun policyName(): String = unwrap(this).getPolicyName()
/**
* The name of the user to associate the policy with.
*
* This parameter allows (through its [regex
* pattern](https://docs.aws.amazon.com/http://wikipedia.org/wiki/regex) ) a string of characters
* consisting of upper and lowercase alphanumeric characters with no spaces. You can also include
* any of the following characters: _+=,.@-
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-userpolicy.html#cfn-iam-userpolicy-username)
*/
override fun userName(): String = unwrap(this).getUserName()
}
public companion object {
public operator fun invoke(block: Builder.() -> Unit = {}): CfnUserPolicyProps {
val builderImpl = BuilderImpl()
return Wrapper(builderImpl.apply(block).build())
}
internal fun wrap(cdkObject: software.amazon.awscdk.services.iam.CfnUserPolicyProps):
CfnUserPolicyProps = CdkObjectWrappers.wrap(cdkObject) as? CfnUserPolicyProps ?:
Wrapper(cdkObject)
internal fun unwrap(wrapped: CfnUserPolicyProps):
software.amazon.awscdk.services.iam.CfnUserPolicyProps = (wrapped as CdkObject).cdkObject as
software.amazon.awscdk.services.iam.CfnUserPolicyProps
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy