Documentation ¶
Overview ¶
The CDK Construct Library for AWS::ServiceCatalog
Index ¶
- func CloudFormationProduct_IsConstruct(x interface{}) *bool
- func CloudFormationProduct_IsResource(construct constructs.IConstruct) *bool
- func NewCloudFormationProduct_Override(c CloudFormationProduct, scope constructs.Construct, id *string, ...)
- func NewCloudFormationTemplate_Override(c CloudFormationTemplate)
- func NewPortfolio_Override(p Portfolio, scope constructs.Construct, id *string, props *PortfolioProps)
- func NewProductStack_Override(p ProductStack, scope constructs.Construct, id *string)
- func NewProduct_Override(p Product, scope constructs.Construct, id *string, props *awscdk.ResourceProps)
- func NewTagOptions_Override(t TagOptions, scope constructs.Construct, id *string, props *TagOptionsProps)
- func Portfolio_IsConstruct(x interface{}) *bool
- func Portfolio_IsResource(construct constructs.IConstruct) *bool
- func ProductStack_IsConstruct(x interface{}) *bool
- func ProductStack_IsStack(x interface{}) *bool
- func ProductStack_Of(construct constructs.IConstruct) awscdk.Stack
- func Product_IsConstruct(x interface{}) *bool
- func Product_IsResource(construct constructs.IConstruct) *bool
- func TagOptions_IsConstruct(x interface{}) *bool
- func TagOptions_IsResource(construct constructs.IConstruct) *bool
- type CloudFormationProduct
- type CloudFormationProductProps
- type CloudFormationProductVersion
- type CloudFormationRuleConstraintOptions
- type CloudFormationTemplate
- type CloudFormationTemplateConfig
- type CommonConstraintOptions
- type IPortfolio
- type IProduct
- type MessageLanguage
- type Portfolio
- type PortfolioProps
- type PortfolioShareOptions
- type Product
- type ProductStack
- type StackSetsConstraintOptions
- type TagOptions
- type TagOptionsProps
- type TagUpdateConstraintOptions
- type TemplateRule
- type TemplateRuleAssertion
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CloudFormationProduct_IsConstruct ¶
func CloudFormationProduct_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead.
func CloudFormationProduct_IsResource ¶
func CloudFormationProduct_IsResource(construct constructs.IConstruct) *bool
Check whether the given construct is a Resource. Experimental.
func NewCloudFormationProduct_Override ¶
func NewCloudFormationProduct_Override(c CloudFormationProduct, scope constructs.Construct, id *string, props *CloudFormationProductProps)
Experimental.
func NewCloudFormationTemplate_Override ¶
func NewCloudFormationTemplate_Override(c CloudFormationTemplate)
Experimental.
func NewPortfolio_Override ¶
func NewPortfolio_Override(p Portfolio, scope constructs.Construct, id *string, props *PortfolioProps)
Experimental.
func NewProductStack_Override ¶
func NewProductStack_Override(p ProductStack, scope constructs.Construct, id *string)
Experimental.
func NewProduct_Override ¶
func NewProduct_Override(p Product, scope constructs.Construct, id *string, props *awscdk.ResourceProps)
Experimental.
func NewTagOptions_Override ¶
func NewTagOptions_Override(t TagOptions, scope constructs.Construct, id *string, props *TagOptionsProps)
Experimental.
func Portfolio_IsConstruct ¶
func Portfolio_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead.
func Portfolio_IsResource ¶
func Portfolio_IsResource(construct constructs.IConstruct) *bool
Check whether the given construct is a Resource. Experimental.
func ProductStack_IsConstruct ¶
func ProductStack_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead.
func ProductStack_IsStack ¶
func ProductStack_IsStack(x interface{}) *bool
Return whether the given object is a Stack.
We do attribute detection since we can't reliably use 'instanceof'. Experimental.
func ProductStack_Of ¶
func ProductStack_Of(construct constructs.IConstruct) awscdk.Stack
Looks up the first stack scope in which `construct` is defined.
Fails if there is no stack up the tree. Experimental.
func Product_IsConstruct ¶
func Product_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead.
func Product_IsResource ¶
func Product_IsResource(construct constructs.IConstruct) *bool
Check whether the given construct is a Resource. Experimental.
func TagOptions_IsConstruct ¶
func TagOptions_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead.
func TagOptions_IsResource ¶
func TagOptions_IsResource(construct constructs.IConstruct) *bool
Check whether the given construct is a Resource. Experimental.
Types ¶
type CloudFormationProduct ¶
type CloudFormationProduct interface { Product // The environment this resource belongs to. // // For resources that are created and managed by the CDK // (generally, those created by creating new class instances like Role, Bucket, etc.), // this is always the same as the environment of the stack they belong to; // however, for imported resources // (those obtained from static methods like fromRoleArn, fromBucketName, etc.), // that might be different than the stack they were imported into. // Experimental. Env() *awscdk.ResourceEnvironment // The tree node. // Experimental. Node() constructs.Node // Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource. // // This value will resolve to one of the following: // - a concrete value (e.g. `"my-awesome-bucket"`) // - `undefined`, when a name should be generated by CloudFormation // - a concrete name generated automatically during synthesis, in // cross-environment scenarios. // Experimental. PhysicalName() *string // The ARN of the product. // Experimental. ProductArn() *string // The id of the product. // Experimental. ProductId() *string // The stack in which this resource is defined. // Experimental. Stack() awscdk.Stack // Apply the given removal policy to this resource. // // The Removal Policy controls what happens to this resource when it stops // being managed by CloudFormation, either because you've removed it from the // CDK application or because you've made a change that requires the resource // to be replaced. // // The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS // account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). // Experimental. ApplyRemovalPolicy(policy awscdk.RemovalPolicy) // Associate Tag Options. // // A TagOption is a key-value pair managed in AWS Service Catalog. // It is not an AWS tag, but serves as a template for creating an AWS tag based on the TagOption. // Experimental. AssociateTagOptions(tagOptions TagOptions) // Experimental. GeneratePhysicalName() *string // Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`). // // Normally, this token will resolve to `arnAttr`, but if the resource is // referenced across environments, `arnComponents` will be used to synthesize // a concrete ARN with the resource's physical name. Make sure to reference // `this.physicalName` in `arnComponents`. // Experimental. GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string // Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`). // // Normally, this token will resolve to `nameAttr`, but if the resource is // referenced across environments, it will be resolved to `this.physicalName`, // which will be a concrete name. // Experimental. GetResourceNameAttribute(nameAttr *string) *string // Returns a string representation of this construct. // Experimental. ToString() *string }
A Service Catalog Cloudformation Product.
Example:
import path "github.com/aws-samples/dummy/path" product := servicecatalog.NewCloudFormationProduct(this, jsii.String("Product"), &cloudFormationProductProps{ productName: jsii.String("My Product"), owner: jsii.String("Product Owner"), productVersions: []cloudFormationProductVersion{ &cloudFormationProductVersion{ productVersionName: jsii.String("v1"), cloudFormationTemplate: servicecatalog.cloudFormationTemplate.fromUrl(jsii.String("https://raw.githubusercontent.com/awslabs/aws-cloudformation-templates/master/aws/services/ServiceCatalog/Product.yaml")), }, &cloudFormationProductVersion{ productVersionName: jsii.String("v2"), cloudFormationTemplate: servicecatalog.*cloudFormationTemplate.fromAsset(path.join(__dirname, jsii.String("development-environment.template.json"))), }, }, })
Experimental.
func NewCloudFormationProduct ¶
func NewCloudFormationProduct(scope constructs.Construct, id *string, props *CloudFormationProductProps) CloudFormationProduct
Experimental.
type CloudFormationProductProps ¶
type CloudFormationProductProps struct { // The owner of the product. // Experimental. Owner *string `json:"owner" yaml:"owner"` // The name of the product. // Experimental. ProductName *string `json:"productName" yaml:"productName"` // The configuration of the product version. // Experimental. ProductVersions *[]*CloudFormationProductVersion `json:"productVersions" yaml:"productVersions"` // The description of the product. // Experimental. Description *string `json:"description" yaml:"description"` // The distributor of the product. // Experimental. Distributor *string `json:"distributor" yaml:"distributor"` // The language code. // // Controls language for logging and errors. // Experimental. MessageLanguage MessageLanguage `json:"messageLanguage" yaml:"messageLanguage"` // Whether to give provisioning artifacts a new unique identifier when the product attributes or provisioning artifacts is updated. // Experimental. ReplaceProductVersionIds *bool `json:"replaceProductVersionIds" yaml:"replaceProductVersionIds"` // The support information about the product. // Experimental. SupportDescription *string `json:"supportDescription" yaml:"supportDescription"` // The contact email for product support. // Experimental. SupportEmail *string `json:"supportEmail" yaml:"supportEmail"` // The contact URL for product support. // Experimental. SupportUrl *string `json:"supportUrl" yaml:"supportUrl"` // TagOptions associated directly to a product. // Experimental. TagOptions TagOptions `json:"tagOptions" yaml:"tagOptions"` }
Properties for a Cloudformation Product.
Example:
import path "github.com/aws-samples/dummy/path" product := servicecatalog.NewCloudFormationProduct(this, jsii.String("Product"), &cloudFormationProductProps{ productName: jsii.String("My Product"), owner: jsii.String("Product Owner"), productVersions: []cloudFormationProductVersion{ &cloudFormationProductVersion{ productVersionName: jsii.String("v1"), cloudFormationTemplate: servicecatalog.cloudFormationTemplate.fromUrl(jsii.String("https://raw.githubusercontent.com/awslabs/aws-cloudformation-templates/master/aws/services/ServiceCatalog/Product.yaml")), }, &cloudFormationProductVersion{ productVersionName: jsii.String("v2"), cloudFormationTemplate: servicecatalog.*cloudFormationTemplate.fromAsset(path.join(__dirname, jsii.String("development-environment.template.json"))), }, }, })
Experimental.
type CloudFormationProductVersion ¶
type CloudFormationProductVersion struct { // The S3 template that points to the provisioning version template. // Experimental. CloudFormationTemplate CloudFormationTemplate `json:"cloudFormationTemplate" yaml:"cloudFormationTemplate"` // The description of the product version. // Experimental. Description *string `json:"description" yaml:"description"` // The name of the product version. // Experimental. ProductVersionName *string `json:"productVersionName" yaml:"productVersionName"` // Whether the specified product template will be validated by CloudFormation. // // If turned off, an invalid template configuration can be stored. // Experimental. ValidateTemplate *bool `json:"validateTemplate" yaml:"validateTemplate"` }
Properties of product version (also known as a provisioning artifact).
Example:
import servicecatalog_alpha "github.com/aws/aws-cdk-go/awscdkservicecatalogalpha" var cloudFormationTemplate cloudFormationTemplate cloudFormationProductVersion := &cloudFormationProductVersion{ cloudFormationTemplate: cloudFormationTemplate, // the properties below are optional description: jsii.String("description"), productVersionName: jsii.String("productVersionName"), validateTemplate: jsii.Boolean(false), }
Experimental.
type CloudFormationRuleConstraintOptions ¶
type CloudFormationRuleConstraintOptions struct { // The description of the constraint. // Experimental. Description *string `json:"description" yaml:"description"` // The language code. // // Configures the language for error messages from service catalog. // Experimental. MessageLanguage MessageLanguage `json:"messageLanguage" yaml:"messageLanguage"` // The rule with condition and assertions to apply to template. // Experimental. Rule *TemplateRule `json:"rule" yaml:"rule"` }
Properties for provisoning rule constraint.
Example:
import cdk "github.com/aws/aws-cdk-go/awscdk" var portfolio portfolio var product cloudFormationProduct portfolio.constrainCloudFormationParameters(product, &cloudFormationRuleConstraintOptions{ rule: &templateRule{ ruleName: jsii.String("testInstanceType"), condition: cdk.fn.conditionEquals(cdk.*fn.ref(jsii.String("Environment")), jsii.String("test")), assertions: []templateRuleAssertion{ &templateRuleAssertion{ assert: cdk.*fn.conditionContains([]*string{ jsii.String("t2.micro"), jsii.String("t2.small"), }, cdk.*fn.ref(jsii.String("InstanceType"))), description: jsii.String("For test environment, the instance type should be small"), }, }, }, })
Experimental.
type CloudFormationTemplate ¶
type CloudFormationTemplate interface { // Called when the product is initialized to allow this object to bind to the stack, add resources and have fun. // Experimental. Bind(scope constructs.Construct) *CloudFormationTemplateConfig }
Represents the Product Provisioning Artifact Template.
Example:
import path "github.com/aws-samples/dummy/path" product := servicecatalog.NewCloudFormationProduct(this, jsii.String("Product"), &cloudFormationProductProps{ productName: jsii.String("My Product"), owner: jsii.String("Product Owner"), productVersions: []cloudFormationProductVersion{ &cloudFormationProductVersion{ productVersionName: jsii.String("v1"), cloudFormationTemplate: servicecatalog.cloudFormationTemplate.fromUrl(jsii.String("https://raw.githubusercontent.com/awslabs/aws-cloudformation-templates/master/aws/services/ServiceCatalog/Product.yaml")), }, &cloudFormationProductVersion{ productVersionName: jsii.String("v2"), cloudFormationTemplate: servicecatalog.*cloudFormationTemplate.fromAsset(path.join(__dirname, jsii.String("development-environment.template.json"))), }, }, })
Experimental.
func CloudFormationTemplate_FromAsset ¶
func CloudFormationTemplate_FromAsset(path *string, options *awss3assets.AssetOptions) CloudFormationTemplate
Loads the provisioning artifacts template from a local disk path. Experimental.
func CloudFormationTemplate_FromProductStack ¶
func CloudFormationTemplate_FromProductStack(productStack ProductStack) CloudFormationTemplate
Creates a product with the resources defined in the given product stack. Experimental.
func CloudFormationTemplate_FromUrl ¶
func CloudFormationTemplate_FromUrl(url *string) CloudFormationTemplate
Template from URL. Experimental.
type CloudFormationTemplateConfig ¶
type CloudFormationTemplateConfig struct { // The http url of the template in S3. // Experimental. HttpUrl *string `json:"httpUrl" yaml:"httpUrl"` }
Result of binding `Template` into a `Product`.
Example:
import servicecatalog_alpha "github.com/aws/aws-cdk-go/awscdkservicecatalogalpha" cloudFormationTemplateConfig := &cloudFormationTemplateConfig{ httpUrl: jsii.String("httpUrl"), }
Experimental.
type CommonConstraintOptions ¶
type CommonConstraintOptions struct { // The description of the constraint. // Experimental. Description *string `json:"description" yaml:"description"` // The language code. // // Configures the language for error messages from service catalog. // Experimental. MessageLanguage MessageLanguage `json:"messageLanguage" yaml:"messageLanguage"` }
Properties for governance mechanisms and constraints.
Example:
import sns "github.com/aws/aws-cdk-go/awscdk" var portfolio portfolio var product cloudFormationProduct topic1 := sns.NewTopic(this, jsii.String("Topic1")) portfolio.notifyOnStackEvents(product, topic1) topic2 := sns.NewTopic(this, jsii.String("Topic2")) portfolio.notifyOnStackEvents(product, topic2, &commonConstraintOptions{ description: jsii.String("description for topic2"), })
Experimental.
type IPortfolio ¶
type IPortfolio interface { awscdk.IResource // Associate portfolio with the given product. // Experimental. AddProduct(product IProduct) // Associate Tag Options. // // A TagOption is a key-value pair managed in AWS Service Catalog. // It is not an AWS tag, but serves as a template for creating an AWS tag based on the TagOption. // Experimental. AssociateTagOptions(tagOptions TagOptions) // Set provisioning rules for the product. // Experimental. ConstrainCloudFormationParameters(product IProduct, options *CloudFormationRuleConstraintOptions) // Add a Resource Update Constraint. // Experimental. ConstrainTagUpdates(product IProduct, options *TagUpdateConstraintOptions) // Configure deployment options using AWS Cloudformation StackSets. // Experimental. DeployWithStackSets(product IProduct, options *StackSetsConstraintOptions) // Associate portfolio with an IAM Group. // Experimental. GiveAccessToGroup(group awsiam.IGroup) // Associate portfolio with an IAM Role. // Experimental. GiveAccessToRole(role awsiam.IRole) // Associate portfolio with an IAM User. // Experimental. GiveAccessToUser(user awsiam.IUser) // Add notifications for supplied topics on the provisioned product. // Experimental. NotifyOnStackEvents(product IProduct, topic awssns.ITopic, options *CommonConstraintOptions) // Force users to assume a certain role when launching a product. // // This sets the launch role using the role arn which is tied to the account this role exists in. // This is useful if you will be provisioning products from the account where this role exists. // If you intend to share the portfolio across accounts, use a local launch role. // Experimental. SetLaunchRole(product IProduct, launchRole awsiam.IRole, options *CommonConstraintOptions) // Force users to assume a certain role when launching a product. // // The role name will be referenced by in the local account and must be set explicitly. // This is useful when sharing the portfolio with multiple accounts. // Experimental. SetLocalLaunchRole(product IProduct, launchRole awsiam.IRole, options *CommonConstraintOptions) // Force users to assume a certain role when launching a product. // // The role will be referenced by name in the local account instead of a static role arn. // A role with this name will automatically be created and assumable by Service Catalog in this account. // This is useful when sharing the portfolio with multiple accounts. // Experimental. SetLocalLaunchRoleName(product IProduct, launchRoleName *string, options *CommonConstraintOptions) awsiam.IRole // Experimental. ShareWithAccount(accountId *string, options *PortfolioShareOptions) // The ARN of the portfolio. // Experimental. PortfolioArn() *string // The ID of the portfolio. // Experimental. PortfolioId() *string }
A Service Catalog portfolio. Experimental.
func Portfolio_FromPortfolioArn ¶
func Portfolio_FromPortfolioArn(scope constructs.Construct, id *string, portfolioArn *string) IPortfolio
Creates a Portfolio construct that represents an external portfolio. Experimental.
type IProduct ¶
type IProduct interface { awscdk.IResource // Associate Tag Options. // // A TagOption is a key-value pair managed in AWS Service Catalog. // It is not an AWS tag, but serves as a template for creating an AWS tag based on the TagOption. // Experimental. AssociateTagOptions(tagOptions TagOptions) // The ARN of the product. // Experimental. ProductArn() *string // The id of the product. // Experimental. ProductId() *string }
A Service Catalog product, currently only supports type CloudFormationProduct. Experimental.
func CloudFormationProduct_FromProductArn ¶
func CloudFormationProduct_FromProductArn(scope constructs.Construct, id *string, productArn *string) IProduct
Creates a Product construct that represents an external product. Experimental.
func Product_FromProductArn ¶
Creates a Product construct that represents an external product. Experimental.
type MessageLanguage ¶
type MessageLanguage string
The language code.
Used for error and logging messages for end users. The default behavior if not specified is English.
Example:
servicecatalog.NewPortfolio(this, jsii.String("Portfolio"), &portfolioProps{ displayName: jsii.String("MyFirstPortfolio"), providerName: jsii.String("SCAdmin"), description: jsii.String("Portfolio for a project"), messageLanguage: servicecatalog.messageLanguage_EN, })
Experimental.
const ( // English. // Experimental. MessageLanguage_EN MessageLanguage = "EN" // Japanese. // Experimental. MessageLanguage_JP MessageLanguage = "JP" // Chinese. // Experimental. MessageLanguage_ZH MessageLanguage = "ZH" )
type Portfolio ¶
type Portfolio interface { awscdk.Resource IPortfolio // The environment this resource belongs to. // // For resources that are created and managed by the CDK // (generally, those created by creating new class instances like Role, Bucket, etc.), // this is always the same as the environment of the stack they belong to; // however, for imported resources // (those obtained from static methods like fromRoleArn, fromBucketName, etc.), // that might be different than the stack they were imported into. // Experimental. Env() *awscdk.ResourceEnvironment // The tree node. // Experimental. Node() constructs.Node // Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource. // // This value will resolve to one of the following: // - a concrete value (e.g. `"my-awesome-bucket"`) // - `undefined`, when a name should be generated by CloudFormation // - a concrete name generated automatically during synthesis, in // cross-environment scenarios. // Experimental. PhysicalName() *string // The ARN of the portfolio. // Experimental. PortfolioArn() *string // The ID of the portfolio. // Experimental. PortfolioId() *string // The stack in which this resource is defined. // Experimental. Stack() awscdk.Stack // Associate portfolio with the given product. // Experimental. AddProduct(product IProduct) // Apply the given removal policy to this resource. // // The Removal Policy controls what happens to this resource when it stops // being managed by CloudFormation, either because you've removed it from the // CDK application or because you've made a change that requires the resource // to be replaced. // // The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS // account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). // Experimental. ApplyRemovalPolicy(policy awscdk.RemovalPolicy) // Associate Tag Options. // // A TagOption is a key-value pair managed in AWS Service Catalog. // It is not an AWS tag, but serves as a template for creating an AWS tag based on the TagOption. // Experimental. AssociateTagOptions(tagOptions TagOptions) // Set provisioning rules for the product. // Experimental. ConstrainCloudFormationParameters(product IProduct, options *CloudFormationRuleConstraintOptions) // Add a Resource Update Constraint. // Experimental. ConstrainTagUpdates(product IProduct, options *TagUpdateConstraintOptions) // Configure deployment options using AWS Cloudformation StackSets. // Experimental. DeployWithStackSets(product IProduct, options *StackSetsConstraintOptions) // Experimental. GeneratePhysicalName() *string // Create a unique id based off the L1 CfnPortfolio or the arn of an imported portfolio. // Experimental. GenerateUniqueHash(value *string) *string // Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`). // // Normally, this token will resolve to `arnAttr`, but if the resource is // referenced across environments, `arnComponents` will be used to synthesize // a concrete ARN with the resource's physical name. Make sure to reference // `this.physicalName` in `arnComponents`. // Experimental. GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string // Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`). // // Normally, this token will resolve to `nameAttr`, but if the resource is // referenced across environments, it will be resolved to `this.physicalName`, // which will be a concrete name. // Experimental. GetResourceNameAttribute(nameAttr *string) *string // Associate portfolio with an IAM Group. // Experimental. GiveAccessToGroup(group awsiam.IGroup) // Associate portfolio with an IAM Role. // Experimental. GiveAccessToRole(role awsiam.IRole) // Associate portfolio with an IAM User. // Experimental. GiveAccessToUser(user awsiam.IUser) // Add notifications for supplied topics on the provisioned product. // Experimental. NotifyOnStackEvents(product IProduct, topic awssns.ITopic, options *CommonConstraintOptions) // Force users to assume a certain role when launching a product. // // This sets the launch role using the role arn which is tied to the account this role exists in. // This is useful if you will be provisioning products from the account where this role exists. // If you intend to share the portfolio across accounts, use a local launch role. // Experimental. SetLaunchRole(product IProduct, launchRole awsiam.IRole, options *CommonConstraintOptions) // Force users to assume a certain role when launching a product. // // The role name will be referenced by in the local account and must be set explicitly. // This is useful when sharing the portfolio with multiple accounts. // Experimental. SetLocalLaunchRole(product IProduct, launchRole awsiam.IRole, options *CommonConstraintOptions) // Force users to assume a certain role when launching a product. // // The role will be referenced by name in the local account instead of a static role arn. // A role with this name will automatically be created and assumable by Service Catalog in this account. // This is useful when sharing the portfolio with multiple accounts. // Experimental. SetLocalLaunchRoleName(product IProduct, launchRoleName *string, options *CommonConstraintOptions) awsiam.IRole // Experimental. ShareWithAccount(accountId *string, options *PortfolioShareOptions) // Returns a string representation of this construct. // Experimental. ToString() *string }
A Service Catalog portfolio.
Example:
servicecatalog.NewPortfolio(this, jsii.String("Portfolio"), &portfolioProps{ displayName: jsii.String("MyPortfolio"), providerName: jsii.String("MyTeam"), })
Experimental.
func NewPortfolio ¶
func NewPortfolio(scope constructs.Construct, id *string, props *PortfolioProps) Portfolio
Experimental.
type PortfolioProps ¶
type PortfolioProps struct { // The name of the portfolio. // Experimental. DisplayName *string `json:"displayName" yaml:"displayName"` // The provider name. // Experimental. ProviderName *string `json:"providerName" yaml:"providerName"` // Description for portfolio. // Experimental. Description *string `json:"description" yaml:"description"` // The message language. // // Controls language for // status logging and errors. // Experimental. MessageLanguage MessageLanguage `json:"messageLanguage" yaml:"messageLanguage"` // TagOptions associated directly to a portfolio. // Experimental. TagOptions TagOptions `json:"tagOptions" yaml:"tagOptions"` }
Properties for a Portfolio.
Example:
servicecatalog.NewPortfolio(this, jsii.String("Portfolio"), &portfolioProps{ displayName: jsii.String("MyPortfolio"), providerName: jsii.String("MyTeam"), })
Experimental.
type PortfolioShareOptions ¶
type PortfolioShareOptions struct { // // Controls status and error message language for share. // Experimental. MessageLanguage MessageLanguage `json:"messageLanguage" yaml:"messageLanguage"` // Experimental. ShareTagOptions *bool `json:"shareTagOptions" yaml:"shareTagOptions"` }
Options for portfolio share.
Example:
import servicecatalog_alpha "github.com/aws/aws-cdk-go/awscdkservicecatalogalpha" portfolioShareOptions := &portfolioShareOptions{ messageLanguage: servicecatalog_alpha.messageLanguage_EN, shareTagOptions: jsii.Boolean(false), }
Experimental.
type Product ¶
type Product interface { awscdk.Resource IProduct // The environment this resource belongs to. // // For resources that are created and managed by the CDK // (generally, those created by creating new class instances like Role, Bucket, etc.), // this is always the same as the environment of the stack they belong to; // however, for imported resources // (those obtained from static methods like fromRoleArn, fromBucketName, etc.), // that might be different than the stack they were imported into. // Experimental. Env() *awscdk.ResourceEnvironment // The tree node. // Experimental. Node() constructs.Node // Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource. // // This value will resolve to one of the following: // - a concrete value (e.g. `"my-awesome-bucket"`) // - `undefined`, when a name should be generated by CloudFormation // - a concrete name generated automatically during synthesis, in // cross-environment scenarios. // Experimental. PhysicalName() *string // The ARN of the product. // Experimental. ProductArn() *string // The id of the product. // Experimental. ProductId() *string // The stack in which this resource is defined. // Experimental. Stack() awscdk.Stack // Apply the given removal policy to this resource. // // The Removal Policy controls what happens to this resource when it stops // being managed by CloudFormation, either because you've removed it from the // CDK application or because you've made a change that requires the resource // to be replaced. // // The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS // account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). // Experimental. ApplyRemovalPolicy(policy awscdk.RemovalPolicy) // Associate Tag Options. // // A TagOption is a key-value pair managed in AWS Service Catalog. // It is not an AWS tag, but serves as a template for creating an AWS tag based on the TagOption. // Experimental. AssociateTagOptions(tagOptions TagOptions) // Experimental. GeneratePhysicalName() *string // Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`). // // Normally, this token will resolve to `arnAttr`, but if the resource is // referenced across environments, `arnComponents` will be used to synthesize // a concrete ARN with the resource's physical name. Make sure to reference // `this.physicalName` in `arnComponents`. // Experimental. GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string // Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`). // // Normally, this token will resolve to `nameAttr`, but if the resource is // referenced across environments, it will be resolved to `this.physicalName`, // which will be a concrete name. // Experimental. GetResourceNameAttribute(nameAttr *string) *string // Returns a string representation of this construct. // Experimental. ToString() *string }
Abstract class for Service Catalog Product.
Example:
import servicecatalog_alpha "github.com/aws/aws-cdk-go/awscdkservicecatalogalpha" product := servicecatalog_alpha.product.fromProductArn(this, jsii.String("MyProduct"), jsii.String("productArn"))
Experimental.
type ProductStack ¶
type ProductStack interface { awscdk.Stack // The AWS account into which this stack will be deployed. // // This value is resolved according to the following rules: // // 1. The value provided to `env.account` when the stack is defined. This can // either be a concerete account (e.g. `585695031111`) or the // `Aws.accountId` token. // 3. `Aws.accountId`, which represents the CloudFormation intrinsic reference // `{ "Ref": "AWS::AccountId" }` encoded as a string token. // // Preferably, you should use the return value as an opaque string and not // attempt to parse it to implement your logic. If you do, you must first // check that it is a concerete value an not an unresolved token. If this // value is an unresolved token (`Token.isUnresolved(stack.account)` returns // `true`), this implies that the user wishes that this stack will synthesize // into a **account-agnostic template**. In this case, your code should either // fail (throw an error, emit a synth error using `Annotations.of(construct).addError()`) or // implement some other region-agnostic behavior. // Experimental. Account() *string // The ID of the cloud assembly artifact for this stack. // Experimental. ArtifactId() *string // Returns the list of AZs that are available in the AWS environment (account/region) associated with this stack. // // If the stack is environment-agnostic (either account and/or region are // tokens), this property will return an array with 2 tokens that will resolve // at deploy-time to the first two availability zones returned from CloudFormation's // `Fn::GetAZs` intrinsic function. // // If they are not available in the context, returns a set of dummy values and // reports them as missing, and let the CLI resolve them by calling EC2 // `DescribeAvailabilityZones` on the target environment. // // To specify a different strategy for selecting availability zones override this method. // Experimental. AvailabilityZones() *[]*string // Indicates whether the stack requires bundling or not. // Experimental. BundlingRequired() *bool // Return the stacks this stack depends on. // Experimental. Dependencies() *[]awscdk.Stack // The environment coordinates in which this stack is deployed. // // In the form // `aws://account/region`. Use `stack.account` and `stack.region` to obtain // the specific values, no need to parse. // // You can use this value to determine if two stacks are targeting the same // environment. // // If either `stack.account` or `stack.region` are not concrete values (e.g. // `Aws.account` or `Aws.region`) the special strings `unknown-account` and/or // `unknown-region` will be used respectively to indicate this stack is // region/account-agnostic. // Experimental. Environment() *string // Indicates if this is a nested stack, in which case `parentStack` will include a reference to it's parent. // Experimental. Nested() *bool // If this is a nested stack, returns it's parent stack. // Experimental. NestedStackParent() awscdk.Stack // If this is a nested stack, this represents its `AWS::CloudFormation::Stack` resource. // // `undefined` for top-level (non-nested) stacks. // Experimental. NestedStackResource() awscdk.CfnResource // The tree node. // Experimental. Node() constructs.Node // Returns the list of notification Amazon Resource Names (ARNs) for the current stack. // Experimental. NotificationArns() *[]*string // The partition in which this stack is defined. // Experimental. Partition() *string // The AWS region into which this stack will be deployed (e.g. `us-west-2`). // // This value is resolved according to the following rules: // // 1. The value provided to `env.region` when the stack is defined. This can // either be a concerete region (e.g. `us-west-2`) or the `Aws.region` // token. // 3. `Aws.region`, which is represents the CloudFormation intrinsic reference // `{ "Ref": "AWS::Region" }` encoded as a string token. // // Preferably, you should use the return value as an opaque string and not // attempt to parse it to implement your logic. If you do, you must first // check that it is a concerete value an not an unresolved token. If this // value is an unresolved token (`Token.isUnresolved(stack.region)` returns // `true`), this implies that the user wishes that this stack will synthesize // into a **region-agnostic template**. In this case, your code should either // fail (throw an error, emit a synth error using `Annotations.of(construct).addError()`) or // implement some other region-agnostic behavior. // Experimental. Region() *string // The ID of the stack. // // Example: // // After resolving, looks like // 'arn:aws:cloudformation:us-west-2:123456789012:stack/teststack/51af3dc0-da77-11e4-872e-1234567db123' // // Experimental. StackId() *string // The concrete CloudFormation physical stack name. // // This is either the name defined explicitly in the `stackName` prop or // allocated based on the stack's location in the construct tree. Stacks that // are directly defined under the app use their construct `id` as their stack // name. Stacks that are defined deeper within the tree will use a hashed naming // scheme based on the construct path to ensure uniqueness. // // If you wish to obtain the deploy-time AWS::StackName intrinsic, // you can use `Aws.stackName` directly. // Experimental. StackName() *string // Synthesis method for this stack. // Experimental. Synthesizer() awscdk.IStackSynthesizer // Tags to be applied to the stack. // Experimental. Tags() awscdk.TagManager // The name of the CloudFormation template file emitted to the output directory during synthesis. // // Example value: `MyStack.template.json` // Experimental. TemplateFile() *string // Options for CloudFormation template (like version, transform, description). // Experimental. TemplateOptions() awscdk.ITemplateOptions // Whether termination protection is enabled for this stack. // Experimental. TerminationProtection() *bool // The Amazon domain suffix for the region in which this stack is defined. // Experimental. UrlSuffix() *string // Add a dependency between this stack and another stack. // // This can be used to define dependencies between any two stacks within an // app, and also supports nested stacks. // Experimental. AddDependency(target awscdk.Stack, reason *string) // Add a Transform to this stack. A Transform is a macro that AWS CloudFormation uses to process your template. // // Duplicate values are removed when stack is synthesized. // // Example: // declare const stack: Stack; // // stack.addTransform('AWS::Serverless-2016-10-31') // // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/transform-section-structure.html // // Experimental. AddTransform(transform *string) // Returns the naming scheme used to allocate logical IDs. // // By default, uses // the `HashedAddressingScheme` but this method can be overridden to customize // this behavior. // // In order to make sure logical IDs are unique and stable, we hash the resource // construct tree path (i.e. toplevel/secondlevel/.../myresource) and add it as // a suffix to the path components joined without a separator (CloudFormation // IDs only allow alphanumeric characters). // // The result will be: // // <path.join(”)><md5(path.join('/')> // "human" "hash" // // If the "human" part of the ID exceeds 240 characters, we simply trim it so // the total ID doesn't exceed CloudFormation's 255 character limit. // // We only take 8 characters from the md5 hash (0.000005 chance of collision). // // Special cases: // // - If the path only contains a single component (i.e. it's a top-level // resource), we won't add the hash to it. The hash is not needed for // disamiguation and also, it allows for a more straightforward migration an // existing CloudFormation template to a CDK stack without logical ID changes // (or renames). // - For aesthetic reasons, if the last components of the path are the same // (i.e. `L1/L2/Pipeline/Pipeline`), they will be de-duplicated to make the // resulting human portion of the ID more pleasing: `L1L2Pipeline<HASH>` // instead of `L1L2PipelinePipeline<HASH>` // - If a component is named "Default" it will be omitted from the path. This // allows refactoring higher level abstractions around constructs without affecting // the IDs of already deployed resources. // - If a component is named "Resource" it will be omitted from the user-visible // path, but included in the hash. This reduces visual noise in the human readable // part of the identifier. // Experimental. AllocateLogicalId(cfnElement awscdk.CfnElement) *string // Create a CloudFormation Export for a value. // // Returns a string representing the corresponding `Fn.importValue()` // expression for this Export. You can control the name for the export by // passing the `name` option. // // If you don't supply a value for `name`, the value you're exporting must be // a Resource attribute (for example: `bucket.bucketName`) and it will be // given the same name as the automatic cross-stack reference that would be created // if you used the attribute in another Stack. // // One of the uses for this method is to *remove* the relationship between // two Stacks established by automatic cross-stack references. It will // temporarily ensure that the CloudFormation Export still exists while you // remove the reference from the consuming stack. After that, you can remove // the resource and the manual export. // // ## Example // // Here is how the process works. Let's say there are two stacks, // `producerStack` and `consumerStack`, and `producerStack` has a bucket // called `bucket`, which is referenced by `consumerStack` (perhaps because // an AWS Lambda Function writes into it, or something like that). // // It is not safe to remove `producerStack.bucket` because as the bucket is being // deleted, `consumerStack` might still be using it. // // Instead, the process takes two deployments: // // ### Deployment 1: break the relationship // // - Make sure `consumerStack` no longer references `bucket.bucketName` (maybe the consumer // stack now uses its own bucket, or it writes to an AWS DynamoDB table, or maybe you just // remove the Lambda Function altogether). // - In the `ProducerStack` class, call `this.exportValue(this.bucket.bucketName)`. This // will make sure the CloudFormation Export continues to exist while the relationship // between the two stacks is being broken. // - Deploy (this will effectively only change the `consumerStack`, but it's safe to deploy both). // // ### Deployment 2: remove the bucket resource // // - You are now free to remove the `bucket` resource from `producerStack`. // - Don't forget to remove the `exportValue()` call as well. // - Deploy again (this time only the `producerStack` will be changed -- the bucket will be deleted). // Experimental. ExportValue(exportedValue interface{}, options *awscdk.ExportValueOptions) *string // Creates an ARN from components. // // If `partition`, `region` or `account` are not specified, the stack's // partition, region and account will be used. // // If any component is the empty string, an empty string will be inserted // into the generated ARN at the location that component corresponds to. // // The ARN will be formatted as follows: // // arn:{partition}:{service}:{region}:{account}:{resource}{sep}}{resource-name} // // The required ARN pieces that are omitted will be taken from the stack that // the 'scope' is attached to. If all ARN pieces are supplied, the supplied scope // can be 'undefined'. // Experimental. FormatArn(components *awscdk.ArnComponents) *string // Allocates a stack-unique CloudFormation-compatible logical identity for a specific resource. // // This method is called when a `CfnElement` is created and used to render the // initial logical identity of resources. Logical ID renames are applied at // this stage. // // This method uses the protected method `allocateLogicalId` to render the // logical ID for an element. To modify the naming scheme, extend the `Stack` // class and override this method. // Experimental. GetLogicalId(element awscdk.CfnElement) *string // Look up a fact value for the given fact for the region of this stack. // // Will return a definite value only if the region of the current stack is resolved. // If not, a lookup map will be added to the stack and the lookup will be done at // CDK deployment time. // // What regions will be included in the lookup map is controlled by the // `@aws-cdk/core:target-partitions` context value: it must be set to a list // of partitions, and only regions from the given partitions will be included. // If no such context key is set, all regions will be included. // // This function is intended to be used by construct library authors. Application // builders can rely on the abstractions offered by construct libraries and do // not have to worry about regional facts. // // If `defaultValue` is not given, it is an error if the fact is unknown for // the given region. // Experimental. RegionalFact(factName *string, defaultValue *string) *string // Rename a generated logical identities. // // To modify the naming scheme strategy, extend the `Stack` class and // override the `allocateLogicalId` method. // Experimental. RenameLogicalId(oldId *string, newId *string) // Indicate that a context key was expected. // // Contains instructions which will be emitted into the cloud assembly on how // the key should be supplied. // Experimental. ReportMissingContextKey(report *cloudassemblyschema.MissingContext) // Resolve a tokenized value in the context of the current stack. // Experimental. Resolve(obj interface{}) interface{} // Splits the provided ARN into its components. // // Works both if 'arn' is a string like 'arn:aws:s3:::bucket', // and a Token representing a dynamic CloudFormation expression // (in which case the returned components will also be dynamic CloudFormation expressions, // encoded as Tokens). // Experimental. SplitArn(arn *string, arnFormat awscdk.ArnFormat) *awscdk.ArnComponents // Convert an object, potentially containing tokens, to a JSON string. // Experimental. ToJsonString(obj interface{}, space *float64) *string // Returns a string representation of this construct. // Experimental. ToString() *string }
A Service Catalog product stack, which is similar in form to a Cloudformation nested stack.
You can add the resources to this stack that you want to define for your service catalog product.
This stack will not be treated as an independent deployment artifact (won't be listed in "cdk list" or deployable through "cdk deploy"), but rather only synthesized as a template and uploaded as an asset to S3.
Example:
import s3 "github.com/aws/aws-cdk-go/awscdk"import cdk "github.com/aws/aws-cdk-go/awscdk" type s3BucketProduct struct { productStack } func newS3BucketProduct(scope construct, id *string) *s3BucketProduct { this := &s3BucketProduct{} servicecatalog.NewProductStack_Override(this, scope, id) s3.NewBucket(this, jsii.String("BucketProduct")) return this } product := servicecatalog.NewCloudFormationProduct(this, jsii.String("Product"), &cloudFormationProductProps{ productName: jsii.String("My Product"), owner: jsii.String("Product Owner"), productVersions: []cloudFormationProductVersion{ &cloudFormationProductVersion{ productVersionName: jsii.String("v1"), cloudFormationTemplate: servicecatalog.cloudFormationTemplate.fromProductStack(NewS3BucketProduct(this, jsii.String("S3BucketProduct"))), }, }, })
Experimental.
func NewProductStack ¶
func NewProductStack(scope constructs.Construct, id *string) ProductStack
Experimental.
type StackSetsConstraintOptions ¶
type StackSetsConstraintOptions struct { // The description of the constraint. // Experimental. Description *string `json:"description" yaml:"description"` // The language code. // // Configures the language for error messages from service catalog. // Experimental. MessageLanguage MessageLanguage `json:"messageLanguage" yaml:"messageLanguage"` // List of accounts to deploy stacks to. // Experimental. Accounts *[]*string `json:"accounts" yaml:"accounts"` // IAM role used to administer the StackSets configuration. // Experimental. AdminRole awsiam.IRole `json:"adminRole" yaml:"adminRole"` // IAM role used to provision the products in the Stacks. // Experimental. ExecutionRoleName *string `json:"executionRoleName" yaml:"executionRoleName"` // List of regions to deploy stacks to. // Experimental. Regions *[]*string `json:"regions" yaml:"regions"` // Wether to allow end users to create, update, and delete stacks. // Experimental. AllowStackSetInstanceOperations *bool `json:"allowStackSetInstanceOperations" yaml:"allowStackSetInstanceOperations"` }
Properties for deploying with Stackset, which creates a StackSet constraint.
Example:
import iam "github.com/aws/aws-cdk-go/awscdk" var portfolio portfolio var product cloudFormationProduct adminRole := iam.NewRole(this, jsii.String("AdminRole"), &roleProps{ assumedBy: iam.NewAccountRootPrincipal(), }) portfolio.deployWithStackSets(product, &stackSetsConstraintOptions{ accounts: []*string{ jsii.String("012345678901"), jsii.String("012345678902"), jsii.String("012345678903"), }, regions: []*string{ jsii.String("us-west-1"), jsii.String("us-east-1"), jsii.String("us-west-2"), jsii.String("us-east-1"), }, adminRole: adminRole, executionRoleName: jsii.String("SCStackSetExecutionRole"), // Name of role deployed in end users accounts. allowStackSetInstanceOperations: jsii.Boolean(true), })
Experimental.
type TagOptions ¶
type TagOptions interface { awscdk.Resource // The environment this resource belongs to. // // For resources that are created and managed by the CDK // (generally, those created by creating new class instances like Role, Bucket, etc.), // this is always the same as the environment of the stack they belong to; // however, for imported resources // (those obtained from static methods like fromRoleArn, fromBucketName, etc.), // that might be different than the stack they were imported into. // Experimental. Env() *awscdk.ResourceEnvironment // The tree node. // Experimental. Node() constructs.Node // Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource. // // This value will resolve to one of the following: // - a concrete value (e.g. `"my-awesome-bucket"`) // - `undefined`, when a name should be generated by CloudFormation // - a concrete name generated automatically during synthesis, in // cross-environment scenarios. // Experimental. PhysicalName() *string // The stack in which this resource is defined. // Experimental. Stack() awscdk.Stack // Apply the given removal policy to this resource. // // The Removal Policy controls what happens to this resource when it stops // being managed by CloudFormation, either because you've removed it from the // CDK application or because you've made a change that requires the resource // to be replaced. // // The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS // account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). // Experimental. ApplyRemovalPolicy(policy awscdk.RemovalPolicy) // Experimental. GeneratePhysicalName() *string // Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`). // // Normally, this token will resolve to `arnAttr`, but if the resource is // referenced across environments, `arnComponents` will be used to synthesize // a concrete ARN with the resource's physical name. Make sure to reference // `this.physicalName` in `arnComponents`. // Experimental. GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string // Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`). // // Normally, this token will resolve to `nameAttr`, but if the resource is // referenced across environments, it will be resolved to `this.physicalName`, // which will be a concrete name. // Experimental. GetResourceNameAttribute(nameAttr *string) *string // Returns a string representation of this construct. // Experimental. ToString() *string }
Defines a set of TagOptions, which are a list of key-value pairs managed in AWS Service Catalog.
It is not an AWS tag, but serves as a template for creating an AWS tag based on the TagOption. See https://docs.aws.amazon.com/servicecatalog/latest/adminguide/tagoptions.html
Example:
var portfolio portfolio var product cloudFormationProduct tagOptionsForPortfolio := servicecatalog.NewTagOptions(this, jsii.String("OrgTagOptions"), &tagOptionsProps{ allowedValuesForTags: map[string][]*string{ "Group": []*string{ jsii.String("finance"), jsii.String("engineering"), jsii.String("marketing"), jsii.String("research"), }, "CostCenter": []*string{ jsii.String("01"), jsii.String("02"), jsii.String("03"), }, }, }) portfolio.associateTagOptions(tagOptionsForPortfolio) tagOptionsForProduct := servicecatalog.NewTagOptions(this, jsii.String("ProductTagOptions"), &tagOptionsProps{ allowedValuesForTags: map[string][]*string{ "Environment": []*string{ jsii.String("dev"), jsii.String("alpha"), jsii.String("prod"), }, }, }) product.associateTagOptions(tagOptionsForProduct)
Experimental.
func NewTagOptions ¶
func NewTagOptions(scope constructs.Construct, id *string, props *TagOptionsProps) TagOptions
Experimental.
type TagOptionsProps ¶
type TagOptionsProps struct { // The values that are allowed to be set for specific tags. // // The keys of the map represent the tag keys, // and the values of the map are a list of allowed values for that particular tag key. // Experimental. AllowedValuesForTags *map[string]*[]*string `json:"allowedValuesForTags" yaml:"allowedValuesForTags"` }
Properties for TagOptions.
Example:
var portfolio portfolio var product cloudFormationProduct tagOptionsForPortfolio := servicecatalog.NewTagOptions(this, jsii.String("OrgTagOptions"), &tagOptionsProps{ allowedValuesForTags: map[string][]*string{ "Group": []*string{ jsii.String("finance"), jsii.String("engineering"), jsii.String("marketing"), jsii.String("research"), }, "CostCenter": []*string{ jsii.String("01"), jsii.String("02"), jsii.String("03"), }, }, }) portfolio.associateTagOptions(tagOptionsForPortfolio) tagOptionsForProduct := servicecatalog.NewTagOptions(this, jsii.String("ProductTagOptions"), &tagOptionsProps{ allowedValuesForTags: map[string][]*string{ "Environment": []*string{ jsii.String("dev"), jsii.String("alpha"), jsii.String("prod"), }, }, }) product.associateTagOptions(tagOptionsForProduct)
Experimental.
type TagUpdateConstraintOptions ¶
type TagUpdateConstraintOptions struct { // The description of the constraint. // Experimental. Description *string `json:"description" yaml:"description"` // The language code. // // Configures the language for error messages from service catalog. // Experimental. MessageLanguage MessageLanguage `json:"messageLanguage" yaml:"messageLanguage"` // Toggle for if users should be allowed to change/update tags on provisioned products. // Experimental. Allow *bool `json:"allow" yaml:"allow"` }
Properties for ResourceUpdateConstraint.
Example:
var portfolio portfolio var product cloudFormationProduct // to disable tag updates: portfolio.constrainTagUpdates(product, &tagUpdateConstraintOptions{ allow: jsii.Boolean(false), })
Experimental.
type TemplateRule ¶
type TemplateRule struct { // A list of assertions that make up the rule. // Experimental. Assertions *[]*TemplateRuleAssertion `json:"assertions" yaml:"assertions"` // Name of the rule. // Experimental. RuleName *string `json:"ruleName" yaml:"ruleName"` // Specify when to apply rule with a rule-specific intrinsic function. // Experimental. Condition awscdk.ICfnRuleConditionExpression `json:"condition" yaml:"condition"` }
Defines the provisioning template constraints.
Example:
import cdk "github.com/aws/aws-cdk-go/awscdk" var portfolio portfolio var product cloudFormationProduct portfolio.constrainCloudFormationParameters(product, &cloudFormationRuleConstraintOptions{ rule: &templateRule{ ruleName: jsii.String("testInstanceType"), condition: cdk.fn.conditionEquals(cdk.*fn.ref(jsii.String("Environment")), jsii.String("test")), assertions: []templateRuleAssertion{ &templateRuleAssertion{ assert: cdk.*fn.conditionContains([]*string{ jsii.String("t2.micro"), jsii.String("t2.small"), }, cdk.*fn.ref(jsii.String("InstanceType"))), description: jsii.String("For test environment, the instance type should be small"), }, }, }, })
Experimental.
type TemplateRuleAssertion ¶
type TemplateRuleAssertion struct { // The assertion condition. // Experimental. Assert awscdk.ICfnRuleConditionExpression `json:"assert" yaml:"assert"` // The description for the asssertion. // Experimental. Description *string `json:"description" yaml:"description"` }
An assertion within a template rule, defined by intrinsic functions.
Example:
import servicecatalog_alpha "github.com/aws/aws-cdk-go/awscdkservicecatalogalpha"import cdk "github.com/aws/aws-cdk-go/awscdk" var cfnRuleConditionExpression iCfnRuleConditionExpression templateRuleAssertion := &templateRuleAssertion{ assert: cfnRuleConditionExpression, // the properties below are optional description: jsii.String("description"), }
Experimental.