Class: AWSCDK::ServiceCatalog::CfnLaunchRoleConstraintProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
service_catalog/cfn_launch_role_constraint_props.rb

Overview

Properties for defining a CfnLaunchRoleConstraint.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(portfolio_id:, product_id:, accept_language: nil, description: nil, local_role_name: nil, role_arn: nil) ⇒ CfnLaunchRoleConstraintProps

Returns a new instance of CfnLaunchRoleConstraintProps.

Parameters:

  • portfolio_id (String)

    The portfolio identifier.

  • product_id (String)

    The product identifier.

  • accept_language (String, nil) (defaults to: nil)

    The language code.

  • description (String, nil) (defaults to: nil)

    The description of the constraint.

  • local_role_name (String, nil) (defaults to: nil)

    You are required to specify either the RoleArn or the LocalRoleName but can't use both.

  • role_arn (String, nil) (defaults to: nil)

    The ARN of the launch role.



15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'service_catalog/cfn_launch_role_constraint_props.rb', line 15

def initialize(portfolio_id:, product_id:, accept_language: nil, description: nil, local_role_name: nil, role_arn: nil)
  @portfolio_id = portfolio_id
  Jsii::Type.check_type(@portfolio_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "portfolioId")
  @product_id = product_id
  Jsii::Type.check_type(@product_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "productId")
  @accept_language = accept_language
  Jsii::Type.check_type(@accept_language, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "acceptLanguage") unless @accept_language.nil?
  @description = description
  Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil?
  @local_role_name = local_role_name
  Jsii::Type.check_type(@local_role_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "localRoleName") unless @local_role_name.nil?
  @role_arn = role_arn
  Jsii::Type.check_type(@role_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "roleArn") unless @role_arn.nil?
end

Instance Attribute Details

#accept_languageString? (readonly)

The language code.

  • jp - Japanese
  • zh - Chinese


47
48
49
# File 'service_catalog/cfn_launch_role_constraint_props.rb', line 47

def accept_language
  @accept_language
end

#descriptionString? (readonly)

The description of the constraint.



52
53
54
# File 'service_catalog/cfn_launch_role_constraint_props.rb', line 52

def description
  @description
end

#local_role_nameString? (readonly)

You are required to specify either the RoleArn or the LocalRoleName but can't use both.

If you specify the LocalRoleName property, when an account uses the launch constraint, the IAM role with that name in the account will be used. This allows launch-role constraints to be account-agnostic so the administrator can create fewer resources per shared account.

The given role name must exist in the account used to create the launch constraint and the account of the user who launches a product with this launch constraint.



61
62
63
# File 'service_catalog/cfn_launch_role_constraint_props.rb', line 61

def local_role_name
  @local_role_name
end

#portfolio_idString (readonly)

The portfolio identifier.



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

def portfolio_id
  @portfolio_id
end

#product_idString (readonly)

The product identifier.



39
40
41
# File 'service_catalog/cfn_launch_role_constraint_props.rb', line 39

def product_id
  @product_id
end

#role_arnString? (readonly)

The ARN of the launch role.

You are required to specify RoleArn or LocalRoleName but can't use both.



68
69
70
# File 'service_catalog/cfn_launch_role_constraint_props.rb', line 68

def role_arn
  @role_arn
end

Class Method Details

.jsii_propertiesObject



70
71
72
73
74
75
76
77
78
79
# File 'service_catalog/cfn_launch_role_constraint_props.rb', line 70

def self.jsii_properties
  {
    :portfolio_id => "portfolioId",
    :product_id => "productId",
    :accept_language => "acceptLanguage",
    :description => "description",
    :local_role_name => "localRoleName",
    :role_arn => "roleArn",
  }
end

Instance Method Details

#to_jsiiObject



81
82
83
84
85
86
87
88
89
90
91
92
# File 'service_catalog/cfn_launch_role_constraint_props.rb', line 81

def to_jsii
  result = {}
  result.merge!({
    "portfolioId" => @portfolio_id,
    "productId" => @product_id,
    "acceptLanguage" => @accept_language,
    "description" => @description,
    "localRoleName" => @local_role_name,
    "roleArn" => @role_arn,
  })
  result.compact
end