![JAR search and dependency download from the Maven repository](/logo.png)
io.cloudshiftdev.awscdk.services.servicecatalog.CfnLaunchTemplateConstraint.kt Maven / Gradle / Ivy
@file:Suppress("RedundantVisibilityModifier","RedundantUnitReturnType","RemoveRedundantQualifierName","unused","UnusedImport","ClassName","REDUNDANT_PROJECTION","DEPRECATION")
package io.cloudshiftdev.awscdk.services.servicecatalog
import io.cloudshiftdev.awscdk.CfnResource
import io.cloudshiftdev.awscdk.IInspectable
import io.cloudshiftdev.awscdk.TreeInspector
import io.cloudshiftdev.awscdk.common.CdkDslMarker
import kotlin.String
import kotlin.Unit
import io.cloudshiftdev.constructs.Construct as CloudshiftdevConstructsConstruct
import software.constructs.Construct as SoftwareConstructsConstruct
/**
* Specifies a template constraint.
*
* 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.servicecatalog.*;
* CfnLaunchTemplateConstraint cfnLaunchTemplateConstraint =
* CfnLaunchTemplateConstraint.Builder.create(this, "MyCfnLaunchTemplateConstraint")
* .portfolioId("portfolioId")
* .productId("productId")
* .rules("rules")
* // the properties below are optional
* .acceptLanguage("acceptLanguage")
* .description("description")
* .build();
* ```
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-servicecatalog-launchtemplateconstraint.html)
*/
public open class CfnLaunchTemplateConstraint(
cdkObject: software.amazon.awscdk.services.servicecatalog.CfnLaunchTemplateConstraint,
) : CfnResource(cdkObject),
IInspectable {
public constructor(
scope: CloudshiftdevConstructsConstruct,
id: String,
props: CfnLaunchTemplateConstraintProps,
) :
this(software.amazon.awscdk.services.servicecatalog.CfnLaunchTemplateConstraint(scope.let(CloudshiftdevConstructsConstruct.Companion::unwrap),
id, props.let(CfnLaunchTemplateConstraintProps.Companion::unwrap))
)
public constructor(
scope: CloudshiftdevConstructsConstruct,
id: String,
props: CfnLaunchTemplateConstraintProps.Builder.() -> Unit,
) : this(scope, id, CfnLaunchTemplateConstraintProps(props)
)
/**
* The language code.
*/
public open fun acceptLanguage(): String? = unwrap(this).getAcceptLanguage()
/**
* The language code.
*/
public open fun acceptLanguage(`value`: String) {
unwrap(this).setAcceptLanguage(`value`)
}
/**
*
*/
public open fun attrId(): String = unwrap(this).getAttrId()
/**
* The description of the constraint.
*/
public open fun description(): String? = unwrap(this).getDescription()
/**
* The description of the constraint.
*/
public open fun description(`value`: String) {
unwrap(this).setDescription(`value`)
}
/**
* Examines the CloudFormation resource and discloses attributes.
*
* @param inspector tree inspector to collect and process attributes.
*/
public override fun inspect(inspector: TreeInspector) {
unwrap(this).inspect(inspector.let(TreeInspector.Companion::unwrap))
}
/**
* The portfolio identifier.
*/
public open fun portfolioId(): String = unwrap(this).getPortfolioId()
/**
* The portfolio identifier.
*/
public open fun portfolioId(`value`: String) {
unwrap(this).setPortfolioId(`value`)
}
/**
* The product identifier.
*/
public open fun productId(): String = unwrap(this).getProductId()
/**
* The product identifier.
*/
public open fun productId(`value`: String) {
unwrap(this).setProductId(`value`)
}
/**
* The constraint rules.
*/
public open fun rules(): String = unwrap(this).getRules()
/**
* The constraint rules.
*/
public open fun rules(`value`: String) {
unwrap(this).setRules(`value`)
}
/**
* A fluent builder for
* [io.cloudshiftdev.awscdk.services.servicecatalog.CfnLaunchTemplateConstraint].
*/
@CdkDslMarker
public interface Builder {
/**
* The language code.
*
* * `jp` - Japanese
* * `zh` - Chinese
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-servicecatalog-launchtemplateconstraint.html#cfn-servicecatalog-launchtemplateconstraint-acceptlanguage)
* @param acceptLanguage The language code.
*/
public fun acceptLanguage(acceptLanguage: String)
/**
* The description of the constraint.
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-servicecatalog-launchtemplateconstraint.html#cfn-servicecatalog-launchtemplateconstraint-description)
* @param description The description of the constraint.
*/
public fun description(description: String)
/**
* The portfolio identifier.
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-servicecatalog-launchtemplateconstraint.html#cfn-servicecatalog-launchtemplateconstraint-portfolioid)
* @param portfolioId The portfolio identifier.
*/
public fun portfolioId(portfolioId: String)
/**
* The product identifier.
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-servicecatalog-launchtemplateconstraint.html#cfn-servicecatalog-launchtemplateconstraint-productid)
* @param productId The product identifier.
*/
public fun productId(productId: String)
/**
* The constraint rules.
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-servicecatalog-launchtemplateconstraint.html#cfn-servicecatalog-launchtemplateconstraint-rules)
* @param rules The constraint rules.
*/
public fun rules(rules: String)
}
private class BuilderImpl(
scope: SoftwareConstructsConstruct,
id: String,
) : Builder {
private val cdkBuilder:
software.amazon.awscdk.services.servicecatalog.CfnLaunchTemplateConstraint.Builder =
software.amazon.awscdk.services.servicecatalog.CfnLaunchTemplateConstraint.Builder.create(scope,
id)
/**
* The language code.
*
* * `jp` - Japanese
* * `zh` - Chinese
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-servicecatalog-launchtemplateconstraint.html#cfn-servicecatalog-launchtemplateconstraint-acceptlanguage)
* @param acceptLanguage The language code.
*/
override fun acceptLanguage(acceptLanguage: String) {
cdkBuilder.acceptLanguage(acceptLanguage)
}
/**
* The description of the constraint.
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-servicecatalog-launchtemplateconstraint.html#cfn-servicecatalog-launchtemplateconstraint-description)
* @param description The description of the constraint.
*/
override fun description(description: String) {
cdkBuilder.description(description)
}
/**
* The portfolio identifier.
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-servicecatalog-launchtemplateconstraint.html#cfn-servicecatalog-launchtemplateconstraint-portfolioid)
* @param portfolioId The portfolio identifier.
*/
override fun portfolioId(portfolioId: String) {
cdkBuilder.portfolioId(portfolioId)
}
/**
* The product identifier.
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-servicecatalog-launchtemplateconstraint.html#cfn-servicecatalog-launchtemplateconstraint-productid)
* @param productId The product identifier.
*/
override fun productId(productId: String) {
cdkBuilder.productId(productId)
}
/**
* The constraint rules.
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-servicecatalog-launchtemplateconstraint.html#cfn-servicecatalog-launchtemplateconstraint-rules)
* @param rules The constraint rules.
*/
override fun rules(rules: String) {
cdkBuilder.rules(rules)
}
public fun build(): software.amazon.awscdk.services.servicecatalog.CfnLaunchTemplateConstraint =
cdkBuilder.build()
}
public companion object {
public val CFN_RESOURCE_TYPE_NAME: String =
software.amazon.awscdk.services.servicecatalog.CfnLaunchTemplateConstraint.CFN_RESOURCE_TYPE_NAME
public operator fun invoke(
scope: CloudshiftdevConstructsConstruct,
id: String,
block: Builder.() -> Unit = {},
): CfnLaunchTemplateConstraint {
val builderImpl = BuilderImpl(CloudshiftdevConstructsConstruct.unwrap(scope), id)
return CfnLaunchTemplateConstraint(builderImpl.apply(block).build())
}
internal
fun wrap(cdkObject: software.amazon.awscdk.services.servicecatalog.CfnLaunchTemplateConstraint):
CfnLaunchTemplateConstraint = CfnLaunchTemplateConstraint(cdkObject)
internal fun unwrap(wrapped: CfnLaunchTemplateConstraint):
software.amazon.awscdk.services.servicecatalog.CfnLaunchTemplateConstraint =
wrapped.cdkObject as
software.amazon.awscdk.services.servicecatalog.CfnLaunchTemplateConstraint
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy