io.cloudshiftdev.awscdk.services.iam.CfnGroupPolicyProps.kt Maven / Gradle / Ivy
The newest version!
@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 `CfnGroupPolicy`.
*
* 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;
* CfnGroupPolicyProps cfnGroupPolicyProps = CfnGroupPolicyProps.builder()
* .groupName("groupName")
* .policyName("policyName")
* // the properties below are optional
* .policyDocument(policyDocument)
* .build();
* ```
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-grouppolicy.html)
*/
public interface CfnGroupPolicyProps {
/**
* The name of the group 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-grouppolicy.html#cfn-iam-grouppolicy-groupname)
*/
public fun groupName(): String
/**
* 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-grouppolicy.html#cfn-iam-grouppolicy-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-grouppolicy.html#cfn-iam-grouppolicy-policyname)
*/
public fun policyName(): String
/**
* A builder for [CfnGroupPolicyProps]
*/
@CdkDslMarker
public interface Builder {
/**
* @param groupName The name of the group 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 groupName(groupName: String)
/**
* @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)
}
private class BuilderImpl : Builder {
private val cdkBuilder: software.amazon.awscdk.services.iam.CfnGroupPolicyProps.Builder =
software.amazon.awscdk.services.iam.CfnGroupPolicyProps.builder()
/**
* @param groupName The name of the group 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 groupName(groupName: String) {
cdkBuilder.groupName(groupName)
}
/**
* @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)
}
public fun build(): software.amazon.awscdk.services.iam.CfnGroupPolicyProps = cdkBuilder.build()
}
private class Wrapper(
cdkObject: software.amazon.awscdk.services.iam.CfnGroupPolicyProps,
) : CdkObject(cdkObject),
CfnGroupPolicyProps {
/**
* The name of the group 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-grouppolicy.html#cfn-iam-grouppolicy-groupname)
*/
override fun groupName(): String = unwrap(this).getGroupName()
/**
* 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-grouppolicy.html#cfn-iam-grouppolicy-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-grouppolicy.html#cfn-iam-grouppolicy-policyname)
*/
override fun policyName(): String = unwrap(this).getPolicyName()
}
public companion object {
public operator fun invoke(block: Builder.() -> Unit = {}): CfnGroupPolicyProps {
val builderImpl = BuilderImpl()
return Wrapper(builderImpl.apply(block).build())
}
internal fun wrap(cdkObject: software.amazon.awscdk.services.iam.CfnGroupPolicyProps):
CfnGroupPolicyProps = CdkObjectWrappers.wrap(cdkObject) as? CfnGroupPolicyProps ?:
Wrapper(cdkObject)
internal fun unwrap(wrapped: CfnGroupPolicyProps):
software.amazon.awscdk.services.iam.CfnGroupPolicyProps = (wrapped as CdkObject).cdkObject
as software.amazon.awscdk.services.iam.CfnGroupPolicyProps
}
}