Module: AWSCDK::ServiceCatalog::IPortfolio

Includes:
IResource, Interfaces::AWSServicecatalog::IPortfolioRef
Included in:
Portfolio
Defined in:
service_catalog/i_portfolio.rb

Overview

A Service Catalog portfolio.

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.jsii_overridable_methodsObject



253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
# File 'service_catalog/i_portfolio.rb', line 253

def self.jsii_overridable_methods
  {
    :node => { kind: :property, name: "node", is_optional: false },
    :env => { kind: :property, name: "env", is_optional: false },
    :stack => { kind: :property, name: "stack", is_optional: false },
    :portfolio_ref => { kind: :property, name: "portfolioRef", is_optional: false },
    :portfolio_arn => { kind: :property, name: "portfolioArn", is_optional: false },
    :portfolio_id => { kind: :property, name: "portfolioId", is_optional: false },
    :with => { kind: :method, name: "with", is_optional: false },
    :apply_removal_policy => { kind: :method, name: "applyRemovalPolicy", is_optional: false },
    :add_product => { kind: :method, name: "addProduct", is_optional: false },
    :associate_tag_options => { kind: :method, name: "associateTagOptions", is_optional: false },
    :constrain_cloud_formation_parameters => { kind: :method, name: "constrainCloudFormationParameters", is_optional: false },
    :constrain_tag_updates => { kind: :method, name: "constrainTagUpdates", is_optional: false },
    :deploy_with_stack_sets => { kind: :method, name: "deployWithStackSets", is_optional: false },
    :give_access_to_group => { kind: :method, name: "giveAccessToGroup", is_optional: false },
    :give_access_to_role => { kind: :method, name: "giveAccessToRole", is_optional: false },
    :give_access_to_user => { kind: :method, name: "giveAccessToUser", is_optional: false },
    :notify_on_stack_events => { kind: :method, name: "notifyOnStackEvents", is_optional: false },
    :set_launch_role => { kind: :method, name: "setLaunchRole", is_optional: false },
    :set_local_launch_role => { kind: :method, name: "setLocalLaunchRole", is_optional: false },
    :set_local_launch_role_name => { kind: :method, name: "setLocalLaunchRoleName", is_optional: false },
    :share_with_account => { kind: :method, name: "shareWithAccount", is_optional: false },
  }
end

Instance Method Details

#add_product(product) ⇒ void

This method returns an undefined value.

Associate portfolio with the given product.

Parameters:



94
95
96
97
# File 'service_catalog/i_portfolio.rb', line 94

def add_product(product)
  Jsii::Type.check_type(product, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc2VydmljZWNhdGFsb2cuSVByb2R1Y3QifQ==")), "product")
  jsii_call_method("addProduct", [product])
end

#apply_removal_policy(policy) ⇒ void

This method returns an undefined value.

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).

Parameters:



85
86
87
88
# File 'service_catalog/i_portfolio.rb', line 85

def apply_removal_policy(policy)
  Jsii::Type.check_type(policy, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5SZW1vdmFsUG9saWN5In0=")), "policy")
  jsii_call_method("applyRemovalPolicy", [policy])
end

#associate_tag_options(tag_options) ⇒ void

This method returns an undefined value.

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.

Parameters:



106
107
108
109
# File 'service_catalog/i_portfolio.rb', line 106

def associate_tag_options(tag_options)
  Jsii::Type.check_type(tag_options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc2VydmljZWNhdGFsb2cuVGFnT3B0aW9ucyJ9")), "tagOptions")
  jsii_call_method("associateTagOptions", [tag_options])
end

#constrain_cloud_formation_parameters(product, options) ⇒ void

This method returns an undefined value.

Set provisioning rules for the product.

Parameters:



116
117
118
119
120
121
# File 'service_catalog/i_portfolio.rb', line 116

def constrain_cloud_formation_parameters(product, options)
  Jsii::Type.check_type(product, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc2VydmljZWNhdGFsb2cuSVByb2R1Y3QifQ==")), "product")
  options = options.is_a?(Hash) ? ::AWSCDK::ServiceCatalog::CloudFormationRuleConstraintOptions.new(**options.transform_keys(&:to_sym)) : options
  Jsii::Type.check_type(options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc2VydmljZWNhdGFsb2cuQ2xvdWRGb3JtYXRpb25SdWxlQ29uc3RyYWludE9wdGlvbnMifQ==")), "options")
  jsii_call_method("constrainCloudFormationParameters", [product, options])
end

#constrain_tag_updates(product, options = nil) ⇒ void

This method returns an undefined value.

Add a Resource Update Constraint.

Parameters:



128
129
130
131
132
133
# File 'service_catalog/i_portfolio.rb', line 128

def constrain_tag_updates(product, options = nil)
  Jsii::Type.check_type(product, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc2VydmljZWNhdGFsb2cuSVByb2R1Y3QifQ==")), "product")
  options = options.is_a?(Hash) ? ::AWSCDK::ServiceCatalog::TagUpdateConstraintOptions.new(**options.transform_keys(&:to_sym)) : options
  Jsii::Type.check_type(options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc2VydmljZWNhdGFsb2cuVGFnVXBkYXRlQ29uc3RyYWludE9wdGlvbnMifQ==")), "options") unless options.nil?
  jsii_call_method("constrainTagUpdates", [product, options])
end

#deploy_with_stack_sets(product, options) ⇒ void

This method returns an undefined value.

Configure deployment options using AWS Cloudformation StackSets.

Parameters:



140
141
142
143
144
145
# File 'service_catalog/i_portfolio.rb', line 140

def deploy_with_stack_sets(product, options)
  Jsii::Type.check_type(product, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc2VydmljZWNhdGFsb2cuSVByb2R1Y3QifQ==")), "product")
  options = options.is_a?(Hash) ? ::AWSCDK::ServiceCatalog::StackSetsConstraintOptions.new(**options.transform_keys(&:to_sym)) : options
  Jsii::Type.check_type(options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc2VydmljZWNhdGFsb2cuU3RhY2tTZXRzQ29uc3RyYWludE9wdGlvbnMifQ==")), "options")
  jsii_call_method("deployWithStackSets", [product, options])
end

#envAWSCDK::Interfaces::ResourceEnvironment

The environment this resource belongs to.

For resources that are created and managed in a Stack (those created by creating new class instances like new Role(), new Bucket(), etc.), this is always the same as the environment of the stack they belong to.

For referenced resources (those obtained from referencing methods like Role.fromRoleArn(), Bucket.fromBucketName(), etc.), they might be different than the stack they were imported into.



27
28
29
# File 'service_catalog/i_portfolio.rb', line 27

def env()
  jsii_get_property("env")
end

#give_access_to_group(group) ⇒ void

This method returns an undefined value.

Associate portfolio with an IAM Group.

Parameters:



151
152
153
154
# File 'service_catalog/i_portfolio.rb', line 151

def give_access_to_group(group)
  Jsii::Type.check_type(group, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklHcm91cCJ9")), "group")
  jsii_call_method("giveAccessToGroup", [group])
end

#give_access_to_role(role) ⇒ void

This method returns an undefined value.

Associate portfolio with an IAM Role.

Parameters:



160
161
162
163
# File 'service_catalog/i_portfolio.rb', line 160

def give_access_to_role(role)
  Jsii::Type.check_type(role, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklSb2xlIn0=")), "role")
  jsii_call_method("giveAccessToRole", [role])
end

#give_access_to_user(user) ⇒ void

This method returns an undefined value.

Associate portfolio with an IAM User.

Parameters:



169
170
171
172
# File 'service_catalog/i_portfolio.rb', line 169

def give_access_to_user(user)
  Jsii::Type.check_type(user, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklVc2VyIn0=")), "user")
  jsii_call_method("giveAccessToUser", [user])
end

#nodeConstructs::Node

The tree node.

Returns:

  • (Constructs::Node)


12
13
14
# File 'service_catalog/i_portfolio.rb', line 12

def node()
  jsii_get_property("node")
end

#notify_on_stack_events(product, topic, options = nil) ⇒ void

This method returns an undefined value.

Add notifications for supplied topics on the provisioned product.

Parameters:



180
181
182
183
184
185
186
# File 'service_catalog/i_portfolio.rb', line 180

def notify_on_stack_events(product, topic, options = nil)
  Jsii::Type.check_type(product, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc2VydmljZWNhdGFsb2cuSVByb2R1Y3QifQ==")), "product")
  Jsii::Type.check_type(topic, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc25zLklUb3BpYyJ9")), "topic")
  options = options.is_a?(Hash) ? ::AWSCDK::ServiceCatalog::CommonConstraintOptions.new(**options.transform_keys(&:to_sym)) : options
  Jsii::Type.check_type(options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc2VydmljZWNhdGFsb2cuQ29tbW9uQ29uc3RyYWludE9wdGlvbnMifQ==")), "options") unless options.nil?
  jsii_call_method("notifyOnStackEvents", [product, topic, options])
end

#portfolio_arnString

The ARN of the portfolio.

Returns:

  • (String)


48
49
50
# File 'service_catalog/i_portfolio.rb', line 48

def portfolio_arn()
  jsii_get_property("portfolioArn")
end

#portfolio_idString

The ID of the portfolio.

Returns:

  • (String)


55
56
57
# File 'service_catalog/i_portfolio.rb', line 55

def portfolio_id()
  jsii_get_property("portfolioId")
end

#portfolio_refAWSCDK::Interfaces::AWSServicecatalog::PortfolioReference

A reference to a Portfolio resource.



41
42
43
# File 'service_catalog/i_portfolio.rb', line 41

def portfolio_ref()
  jsii_get_property("portfolioRef")
end

#set_launch_role(product, launch_role, options = nil) ⇒ void

This method returns an undefined value.

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.

Parameters:



198
199
200
201
202
203
204
# File 'service_catalog/i_portfolio.rb', line 198

def set_launch_role(product, launch_role, options = nil)
  Jsii::Type.check_type(product, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc2VydmljZWNhdGFsb2cuSVByb2R1Y3QifQ==")), "product")
  Jsii::Type.check_type(launch_role, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklSb2xlIn0=")), "launchRole")
  options = options.is_a?(Hash) ? ::AWSCDK::ServiceCatalog::CommonConstraintOptions.new(**options.transform_keys(&:to_sym)) : options
  Jsii::Type.check_type(options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc2VydmljZWNhdGFsb2cuQ29tbW9uQ29uc3RyYWludE9wdGlvbnMifQ==")), "options") unless options.nil?
  jsii_call_method("setLaunchRole", [product, launch_role, options])
end

#set_local_launch_role(product, launch_role, options = nil) ⇒ void

This method returns an undefined value.

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.

Parameters:



215
216
217
218
219
220
221
# File 'service_catalog/i_portfolio.rb', line 215

def set_local_launch_role(product, launch_role, options = nil)
  Jsii::Type.check_type(product, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc2VydmljZWNhdGFsb2cuSVByb2R1Y3QifQ==")), "product")
  Jsii::Type.check_type(launch_role, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklSb2xlIn0=")), "launchRole")
  options = options.is_a?(Hash) ? ::AWSCDK::ServiceCatalog::CommonConstraintOptions.new(**options.transform_keys(&:to_sym)) : options
  Jsii::Type.check_type(options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc2VydmljZWNhdGFsb2cuQ29tbW9uQ29uc3RyYWludE9wdGlvbnMifQ==")), "options") unless options.nil?
  jsii_call_method("setLocalLaunchRole", [product, launch_role, options])
end

#set_local_launch_role_name(product, launch_role_name, options = nil) ⇒ AWSCDK::IAM::IRole

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.

Parameters:

Returns:



233
234
235
236
237
238
239
# File 'service_catalog/i_portfolio.rb', line 233

def set_local_launch_role_name(product, launch_role_name, options = nil)
  Jsii::Type.check_type(product, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc2VydmljZWNhdGFsb2cuSVByb2R1Y3QifQ==")), "product")
  Jsii::Type.check_type(launch_role_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "launchRoleName")
  options = options.is_a?(Hash) ? ::AWSCDK::ServiceCatalog::CommonConstraintOptions.new(**options.transform_keys(&:to_sym)) : options
  Jsii::Type.check_type(options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc2VydmljZWNhdGFsb2cuQ29tbW9uQ29uc3RyYWludE9wdGlvbnMifQ==")), "options") unless options.nil?
  jsii_call_method("setLocalLaunchRoleName", [product, launch_role_name, options])
end

#share_with_account(account_id, options = nil) ⇒ void

This method returns an undefined value.

Initiate a portfolio share with another account.

Parameters:



246
247
248
249
250
251
# File 'service_catalog/i_portfolio.rb', line 246

def (, options = nil)
  Jsii::Type.check_type(, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "accountId")
  options = options.is_a?(Hash) ? ::AWSCDK::ServiceCatalog::PortfolioShareOptions.new(**options.transform_keys(&:to_sym)) : options
  Jsii::Type.check_type(options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc2VydmljZWNhdGFsb2cuUG9ydGZvbGlvU2hhcmVPcHRpb25zIn0=")), "options") unless options.nil?
  jsii_call_method("shareWithAccount", [, options])
end

#stackAWSCDK::Stack

The stack in which this resource is defined.

Returns:



34
35
36
# File 'service_catalog/i_portfolio.rb', line 34

def stack()
  jsii_get_property("stack")
end

#with(*mixins) ⇒ Constructs::IConstruct

Applies one or more mixins to this construct.

Mixins are applied in order. The list of constructs is captured at the start of the call, so constructs added by a mixin will not be visited.

Parameters:

  • mixins (Array<Constructs::IMixin>)

    The mixins to apply.

Returns:

  • (Constructs::IConstruct)

    This construct for chaining



66
67
68
69
70
71
# File 'service_catalog/i_portfolio.rb', line 66

def with(*mixins)
  mixins.each_with_index do |item, index|
    Jsii::Type.check_type(item, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLklNaXhpbiJ9")), "mixins[#{index}]")
  end
  jsii_call_method("with", [*mixins])
end