Class: AWSCDK::ServiceCatalog::Portfolio
- Inherits:
-
Resource
- Object
- Resource
- AWSCDK::ServiceCatalog::Portfolio
- Includes:
- IPortfolio
- Defined in:
- service_catalog/portfolio.rb
Overview
A Service Catalog portfolio.
Class Method Summary collapse
-
.from_portfolio_arn(scope, id, portfolio_arn) ⇒ AWSCDK::ServiceCatalog::IPortfolio
Creates a Portfolio construct that represents an external portfolio.
- .jsii_overridable_methods ⇒ Object
-
.PROPERTY_INJECTION_ID ⇒ String
Uniquely identifies this class.
Instance Method Summary collapse
-
#add_bucket_permissions_to_shared_accounts ⇒ void
Gives access to Asset Buckets to Shared Accounts.
-
#add_product(product) ⇒ void
Associate portfolio with the given product.
-
#apply_cross_stack_reference_strength(strength) ⇒ void
Override the cross-stack reference strength for this resource.
-
#apply_removal_policy(policy) ⇒ void
Apply the given removal policy to this resource.
-
#associate_tag_options(tag_options) ⇒ void
Associate Tag Options.
-
#constrain_cloud_formation_parameters(product, options) ⇒ void
Set provisioning rules for the product.
-
#constrain_tag_updates(product, options = nil) ⇒ void
Add a Resource Update Constraint.
-
#deploy_with_stack_sets(product, options) ⇒ void
Configure deployment options using AWS Cloudformation StackSets.
-
#env ⇒ AWSCDK::Interfaces::ResourceEnvironment
The environment this resource belongs to.
- #generate_physical_name ⇒ String
-
#generate_unique_hash(value) ⇒ String
Create a unique id based off the L1 CfnPortfolio or the arn of an imported portfolio.
-
#get_resource_arn_attribute(arn_attr, arn_components) ⇒ String
Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g.
bucket.bucketArn). -
#get_resource_name_attribute(name_attr) ⇒ String
Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g.
bucket.bucketName). -
#give_access_to_group(group) ⇒ void
Associate portfolio with an IAM Group.
-
#give_access_to_role(role) ⇒ void
Associate portfolio with an IAM Role.
-
#give_access_to_user(user) ⇒ void
Associate portfolio with an IAM User.
-
#initialize(scope, id, props) ⇒ Portfolio
constructor
A new instance of Portfolio.
-
#node ⇒ Constructs::Node
The tree node.
-
#notify_on_stack_events(product, topic, options = nil) ⇒ void
Add notifications for supplied topics on the provisioned product.
-
#physical_name ⇒ String
Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource.
-
#portfolio_arn ⇒ String
The ARN of the portfolio.
-
#portfolio_id ⇒ String
The ID of the portfolio.
-
#portfolio_ref ⇒ AWSCDK::Interfaces::AWSServicecatalog::PortfolioReference
A reference to a Portfolio resource.
-
#set_launch_role(product, launch_role, options = nil) ⇒ void
Force users to assume a certain role when launching a product.
-
#set_local_launch_role(product, launch_role, options = nil) ⇒ void
Force users to assume a certain role when launching a product.
-
#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.
-
#share_with_account(account_id, options = nil) ⇒ void
Initiate a portfolio share with another account.
-
#stack ⇒ AWSCDK::Stack
The stack in which this resource is defined.
-
#to_string ⇒ String
Returns a string representation of this construct.
-
#with(*mixins) ⇒ Constructs::IConstruct
Applies one or more mixins to this construct.
Constructor Details
#initialize(scope, id, props) ⇒ Portfolio
Returns a new instance of Portfolio.
12 13 14 15 16 17 18 |
# File 'service_catalog/portfolio.rb', line 12 def initialize(scope, id, props) props = props.is_a?(Hash) ? ::AWSCDK::ServiceCatalog::PortfolioProps.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(scope, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLkNvbnN0cnVjdCJ9")), "scope") Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id") Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc2VydmljZWNhdGFsb2cuUG9ydGZvbGlvUHJvcHMifQ==")), "props") Jsii::Object.instance_method(:initialize).bind(self).call(scope, id, props) end |
Class Method Details
.from_portfolio_arn(scope, id, portfolio_arn) ⇒ AWSCDK::ServiceCatalog::IPortfolio
Creates a Portfolio construct that represents an external portfolio.
60 61 62 63 64 65 |
# File 'service_catalog/portfolio.rb', line 60 def self.from_portfolio_arn(scope, id, portfolio_arn) Jsii::Type.check_type(scope, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLkNvbnN0cnVjdCJ9")), "scope") Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id") Jsii::Type.check_type(portfolio_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "portfolioArn") Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_servicecatalog.Portfolio", "fromPortfolioArn", [scope, id, portfolio_arn]) end |
.jsii_overridable_methods ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'service_catalog/portfolio.rb', line 20 def self.jsii_overridable_methods { :node => { kind: :property, name: "node", is_optional: false }, :env => { kind: :property, name: "env", is_optional: false }, :physical_name => { kind: :property, name: "physicalName", is_optional: false }, :stack => { kind: :property, name: "stack", is_optional: false }, :portfolio_arn => { kind: :property, name: "portfolioArn", is_optional: false }, :portfolio_id => { kind: :property, name: "portfolioId", is_optional: false }, :portfolio_ref => { kind: :property, name: "portfolioRef", is_optional: false }, :to_string => { kind: :method, name: "toString", is_optional: false }, :with => { kind: :method, name: "with", is_optional: false }, :apply_cross_stack_reference_strength => { kind: :method, name: "applyCrossStackReferenceStrength", is_optional: false }, :apply_removal_policy => { kind: :method, name: "applyRemovalPolicy", is_optional: false }, :generate_physical_name => { kind: :method, name: "generatePhysicalName", is_optional: false }, :get_resource_arn_attribute => { kind: :method, name: "getResourceArnAttribute", is_optional: false }, :get_resource_name_attribute => { kind: :method, name: "getResourceNameAttribute", is_optional: false }, :add_bucket_permissions_to_shared_accounts => { kind: :method, name: "addBucketPermissionsToSharedAccounts", 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 }, :generate_unique_hash => { kind: :method, name: "generateUniqueHash", 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 |
.PROPERTY_INJECTION_ID ⇒ String
Uniquely identifies this class.
113 114 115 |
# File 'service_catalog/portfolio.rb', line 113 def self.PROPERTY_INJECTION_ID() Jsii::Kernel.instance.get_static("aws-cdk-lib.aws_servicecatalog.Portfolio", "PROPERTY_INJECTION_ID") end |
Instance Method Details
#add_bucket_permissions_to_shared_accounts ⇒ void
This method returns an undefined value.
Gives access to Asset Buckets to Shared Accounts.
231 232 233 |
# File 'service_catalog/portfolio.rb', line 231 def () jsii_call_method("addBucketPermissionsToSharedAccounts", []) end |
#add_product(product) ⇒ void
This method returns an undefined value.
Associate portfolio with the given product.
239 240 241 242 |
# File 'service_catalog/portfolio.rb', line 239 def add_product(product) Jsii::Type.check_type(product, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc2VydmljZWNhdGFsb2cuSVByb2R1Y3QifQ==")), "product") jsii_call_method("addProduct", [product]) end |
#apply_cross_stack_reference_strength(strength) ⇒ void
This method returns an undefined value.
Override the cross-stack reference strength for this resource.
When set, any cross-stack reference to this resource will use the specified
mechanism instead of the global default determined by the
@aws-cdk/core:defaultCrossStackReferences context key. This is useful for
selectively weakening specific references to avoid the "deadly embrace" problem
without changing the app-wide default.
171 172 173 174 |
# File 'service_catalog/portfolio.rb', line 171 def apply_cross_stack_reference_strength(strength) Jsii::Type.check_type(strength, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5SZWZlcmVuY2VTdHJlbmd0aCJ9")), "strength") jsii_call_method("applyCrossStackReferenceStrength", [strength]) 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).
188 189 190 191 |
# File 'service_catalog/portfolio.rb', line 188 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.
251 252 253 254 |
# File 'service_catalog/portfolio.rb', line 251 def () Jsii::Type.check_type(, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc2VydmljZWNhdGFsb2cuVGFnT3B0aW9ucyJ9")), "tagOptions") jsii_call_method("associateTagOptions", []) end |
#constrain_cloud_formation_parameters(product, options) ⇒ void
This method returns an undefined value.
Set provisioning rules for the product.
261 262 263 264 265 266 |
# File 'service_catalog/portfolio.rb', line 261 def constrain_cloud_formation_parameters(product, ) Jsii::Type.check_type(product, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc2VydmljZWNhdGFsb2cuSVByb2R1Y3QifQ==")), "product") = .is_a?(Hash) ? ::AWSCDK::ServiceCatalog::CloudFormationRuleConstraintOptions.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc2VydmljZWNhdGFsb2cuQ2xvdWRGb3JtYXRpb25SdWxlQ29uc3RyYWludE9wdGlvbnMifQ==")), "options") jsii_call_method("constrainCloudFormationParameters", [product, ]) end |
#constrain_tag_updates(product, options = nil) ⇒ void
This method returns an undefined value.
Add a Resource Update Constraint.
273 274 275 276 277 278 |
# File 'service_catalog/portfolio.rb', line 273 def constrain_tag_updates(product, = nil) Jsii::Type.check_type(product, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc2VydmljZWNhdGFsb2cuSVByb2R1Y3QifQ==")), "product") = .is_a?(Hash) ? ::AWSCDK::ServiceCatalog::TagUpdateConstraintOptions.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc2VydmljZWNhdGFsb2cuVGFnVXBkYXRlQ29uc3RyYWludE9wdGlvbnMifQ==")), "options") unless .nil? jsii_call_method("constrainTagUpdates", [product, ]) end |
#deploy_with_stack_sets(product, options) ⇒ void
This method returns an undefined value.
Configure deployment options using AWS Cloudformation StackSets.
285 286 287 288 289 290 |
# File 'service_catalog/portfolio.rb', line 285 def deploy_with_stack_sets(product, ) Jsii::Type.check_type(product, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc2VydmljZWNhdGFsb2cuSVByb2R1Y3QifQ==")), "product") = .is_a?(Hash) ? ::AWSCDK::ServiceCatalog::StackSetsConstraintOptions.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc2VydmljZWNhdGFsb2cuU3RhY2tTZXRzQ29uc3RyYWludE9wdGlvbnMifQ==")), "options") jsii_call_method("deployWithStackSets", [product, ]) end |
#env ⇒ AWSCDK::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.
85 86 87 |
# File 'service_catalog/portfolio.rb', line 85 def env() jsii_get_property("env") end |
#generate_physical_name ⇒ String
194 195 196 |
# File 'service_catalog/portfolio.rb', line 194 def generate_physical_name() jsii_call_method("generatePhysicalName", []) end |
#generate_unique_hash(value) ⇒ String
Create a unique id based off the L1 CfnPortfolio or the arn of an imported portfolio.
296 297 298 299 |
# File 'service_catalog/portfolio.rb', line 296 def generate_unique_hash(value) Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "value") jsii_call_method("generateUniqueHash", [value]) end |
#get_resource_arn_attribute(arn_attr, arn_components) ⇒ 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 arn_attr, but if the resource is
referenced across environments, arn_components will be used to synthesize
a concrete ARN with the resource's physical name. Make sure to reference
this.physicalName in arn_components.
208 209 210 211 212 213 |
# File 'service_catalog/portfolio.rb', line 208 def get_resource_arn_attribute(arn_attr, arn_components) Jsii::Type.check_type(arn_attr, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "arnAttr") arn_components = arn_components.is_a?(Hash) ? ::AWSCDK::ARNComponents.new(**arn_components.transform_keys(&:to_sym)) : arn_components Jsii::Type.check_type(arn_components, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5Bcm5Db21wb25lbnRzIn0=")), "arnComponents") jsii_call_method("getResourceArnAttribute", [arn_attr, arn_components]) end |
#get_resource_name_attribute(name_attr) ⇒ 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 name_attr, but if the resource is
referenced across environments, it will be resolved to this.physicalName,
which will be a concrete name.
223 224 225 226 |
# File 'service_catalog/portfolio.rb', line 223 def get_resource_name_attribute(name_attr) Jsii::Type.check_type(name_attr, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "nameAttr") jsii_call_method("getResourceNameAttribute", [name_attr]) end |
#give_access_to_group(group) ⇒ void
This method returns an undefined value.
Associate portfolio with an IAM Group.
305 306 307 308 |
# File 'service_catalog/portfolio.rb', line 305 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.
314 315 316 317 |
# File 'service_catalog/portfolio.rb', line 314 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.
323 324 325 326 |
# File 'service_catalog/portfolio.rb', line 323 def give_access_to_user(user) Jsii::Type.check_type(user, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklVc2VyIn0=")), "user") jsii_call_method("giveAccessToUser", [user]) end |
#node ⇒ Constructs::Node
The tree node.
70 71 72 |
# File 'service_catalog/portfolio.rb', line 70 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.
334 335 336 337 338 339 340 |
# File 'service_catalog/portfolio.rb', line 334 def notify_on_stack_events(product, topic, = 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") = .is_a?(Hash) ? ::AWSCDK::ServiceCatalog::CommonConstraintOptions.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc2VydmljZWNhdGFsb2cuQ29tbW9uQ29uc3RyYWludE9wdGlvbnMifQ==")), "options") unless .nil? jsii_call_method("notifyOnStackEvents", [product, topic, ]) end |
#physical_name ⇒ String
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.
99 100 101 |
# File 'service_catalog/portfolio.rb', line 99 def physical_name() jsii_get_property("physicalName") end |
#portfolio_arn ⇒ String
The ARN of the portfolio.
120 121 122 |
# File 'service_catalog/portfolio.rb', line 120 def portfolio_arn() jsii_get_property("portfolioArn") end |
#portfolio_id ⇒ String
The ID of the portfolio.
127 128 129 |
# File 'service_catalog/portfolio.rb', line 127 def portfolio_id() jsii_get_property("portfolioId") end |
#portfolio_ref ⇒ AWSCDK::Interfaces::AWSServicecatalog::PortfolioReference
A reference to a Portfolio resource.
134 135 136 |
# File 'service_catalog/portfolio.rb', line 134 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.
352 353 354 355 356 357 358 |
# File 'service_catalog/portfolio.rb', line 352 def set_launch_role(product, launch_role, = 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") = .is_a?(Hash) ? ::AWSCDK::ServiceCatalog::CommonConstraintOptions.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc2VydmljZWNhdGFsb2cuQ29tbW9uQ29uc3RyYWludE9wdGlvbnMifQ==")), "options") unless .nil? jsii_call_method("setLaunchRole", [product, launch_role, ]) 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.
369 370 371 372 373 374 375 |
# File 'service_catalog/portfolio.rb', line 369 def set_local_launch_role(product, launch_role, = 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") = .is_a?(Hash) ? ::AWSCDK::ServiceCatalog::CommonConstraintOptions.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc2VydmljZWNhdGFsb2cuQ29tbW9uQ29uc3RyYWludE9wdGlvbnMifQ==")), "options") unless .nil? jsii_call_method("setLocalLaunchRole", [product, launch_role, ]) 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.
387 388 389 390 391 392 393 |
# File 'service_catalog/portfolio.rb', line 387 def set_local_launch_role_name(product, launch_role_name, = 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") = .is_a?(Hash) ? ::AWSCDK::ServiceCatalog::CommonConstraintOptions.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc2VydmljZWNhdGFsb2cuQ29tbW9uQ29uc3RyYWludE9wdGlvbnMifQ==")), "options") unless .nil? jsii_call_method("setLocalLaunchRoleName", [product, launch_role_name, ]) end |
#share_with_account(account_id, options = nil) ⇒ void
This method returns an undefined value.
Initiate a portfolio share with another account.
400 401 402 403 404 405 |
# File 'service_catalog/portfolio.rb', line 400 def share_with_account(account_id, = nil) Jsii::Type.check_type(account_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "accountId") = .is_a?(Hash) ? ::AWSCDK::ServiceCatalog::PortfolioShareOptions.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc2VydmljZWNhdGFsb2cuUG9ydGZvbGlvU2hhcmVPcHRpb25zIn0=")), "options") unless .nil? jsii_call_method("shareWithAccount", [account_id, ]) end |
#stack ⇒ AWSCDK::Stack
The stack in which this resource is defined.
106 107 108 |
# File 'service_catalog/portfolio.rb', line 106 def stack() jsii_get_property("stack") end |
#to_string ⇒ String
Returns a string representation of this construct.
141 142 143 |
# File 'service_catalog/portfolio.rb', line 141 def to_string() jsii_call_method("toString", []) 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.
Use multiple with() calls if subsequent mixins should apply to added
constructs.
154 155 156 157 158 159 |
# File 'service_catalog/portfolio.rb', line 154 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 |