Class: AWSCDK::RAM::CfnResourceShareProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
ram/cfn_resource_share_props.rb

Overview

Properties for defining a CfnResourceShare.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, allow_external_principals: nil, permission_arns: nil, principals: nil, resource_arns: nil, resource_share_configuration: nil, sources: nil, tags: nil) ⇒ CfnResourceShareProps

Returns a new instance of CfnResourceShareProps.

Parameters:

  • name (String)

    Specifies the name of the resource share.

  • allow_external_principals (Boolean, AWSCDK::IResolvable, nil) (defaults to: nil)

    Specifies whether principals outside your organization in AWS Organizations can be associated with a resource share.

  • permission_arns (Array<String>, nil) (defaults to: nil)

    Specifies the Amazon Resource Names (ARNs) of the AWS RAM permission to associate with the resource share. If you do not specify an ARN for the permission, AWS RAM automatically attaches the default version of the permission for each resource type. You can associate only one permission with each resource type included in the resource share.

  • principals (Array<String>, nil) (defaults to: nil)

    Specifies the principals to associate with the resource share. The possible values are:.

  • resource_arns (Array<String>, nil) (defaults to: nil)

    Specifies a list of one or more ARNs of the resources to associate with the resource share.

  • resource_share_configuration (AWSCDK::IResolvable, AWSCDK::RAM::CfnResourceShare::ResourceShareConfigurationProperty, nil) (defaults to: nil)

    The configuration for a resource share.

  • sources (Array<String>, nil) (defaults to: nil)

    Specifies from which source accounts the service principal has access to the resources in this resource share.

  • tags (Array<AWSCDK::CfnTag>, nil) (defaults to: nil)

    Specifies one or more tags to attach to the resource share itself.



17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'ram/cfn_resource_share_props.rb', line 17

def initialize(name:, allow_external_principals: nil, permission_arns: nil, principals: nil, resource_arns: nil, resource_share_configuration: nil, sources: nil, tags: nil)
  @name = name
  Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name")
  @allow_external_principals = allow_external_principals
  Jsii::Type.check_type(@allow_external_principals, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "allowExternalPrincipals") unless @allow_external_principals.nil?
  @permission_arns = permission_arns
  Jsii::Type.check_type(@permission_arns, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "permissionArns") unless @permission_arns.nil?
  @principals = principals
  Jsii::Type.check_type(@principals, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "principals") unless @principals.nil?
  @resource_arns = resource_arns
  Jsii::Type.check_type(@resource_arns, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "resourceArns") unless @resource_arns.nil?
  @resource_share_configuration = resource_share_configuration.is_a?(Hash) ? ::AWSCDK::RAM::CfnResourceShare::ResourceShareConfigurationProperty.new(**resource_share_configuration.transform_keys(&:to_sym)) : resource_share_configuration
  Jsii::Type.check_type(@resource_share_configuration, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19yYW0uQ2ZuUmVzb3VyY2VTaGFyZS5SZXNvdXJjZVNoYXJlQ29uZmlndXJhdGlvblByb3BlcnR5In1dfX0=")), "resourceShareConfiguration") unless @resource_share_configuration.nil?
  @sources = sources
  Jsii::Type.check_type(@sources, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "sources") unless @sources.nil?
  @tags = tags.is_a?(Array) ? tags.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil?
end

Instance Attribute Details

#allow_external_principalsBoolean, ... (readonly)

Specifies whether principals outside your organization in AWS Organizations can be associated with a resource share.

A value of true lets you share with individual AWS accounts that are not in your organization. A value of false only has meaning if your account is a member of an AWS Organization. The default value is true .



47
48
49
# File 'ram/cfn_resource_share_props.rb', line 47

def allow_external_principals
  @allow_external_principals
end

#nameString (readonly)

Specifies the name of the resource share.



40
41
42
# File 'ram/cfn_resource_share_props.rb', line 40

def name
  @name
end

#permission_arnsArray<String>? (readonly)

Specifies the Amazon Resource Names (ARNs) of the AWS RAM permission to associate with the resource share. If you do not specify an ARN for the permission, AWS RAM automatically attaches the default version of the permission for each resource type. You can associate only one permission with each resource type included in the resource share.



52
53
54
# File 'ram/cfn_resource_share_props.rb', line 52

def permission_arns
  @permission_arns
end

#principalsArray<String>? (readonly)

Specifies the principals to associate with the resource share. The possible values are:.

  • An AWS account ID
  • An Amazon Resource Name (ARN) of an organization in AWS Organizations
  • An ARN of an organizational unit (OU) in AWS Organizations
  • An ARN of an IAM role
  • An ARN of an IAM user

Not all resource types can be shared with IAM roles and users. For more information, see the column Can share with IAM roles and users in the tables on Shareable AWS resources in the AWS Resource Access Manager User Guide .



65
66
67
# File 'ram/cfn_resource_share_props.rb', line 65

def principals
  @principals
end

#resource_arnsArray<String>? (readonly)

Specifies a list of one or more ARNs of the resources to associate with the resource share.



70
71
72
# File 'ram/cfn_resource_share_props.rb', line 70

def resource_arns
  @resource_arns
end

#resource_share_configurationAWSCDK::IResolvable, ... (readonly)

The configuration for a resource share.



75
76
77
# File 'ram/cfn_resource_share_props.rb', line 75

def resource_share_configuration
  @resource_share_configuration
end

#sourcesArray<String>? (readonly)

Specifies from which source accounts the service principal has access to the resources in this resource share.



80
81
82
# File 'ram/cfn_resource_share_props.rb', line 80

def sources
  @sources
end

#tagsArray<AWSCDK::CfnTag>? (readonly)

Specifies one or more tags to attach to the resource share itself.

It doesn't attach the tags to the resources associated with the resource share.



87
88
89
# File 'ram/cfn_resource_share_props.rb', line 87

def tags
  @tags
end

Class Method Details

.jsii_propertiesObject



89
90
91
92
93
94
95
96
97
98
99
100
# File 'ram/cfn_resource_share_props.rb', line 89

def self.jsii_properties
  {
    :name => "name",
    :allow_external_principals => "allowExternalPrincipals",
    :permission_arns => "permissionArns",
    :principals => "principals",
    :resource_arns => "resourceArns",
    :resource_share_configuration => "resourceShareConfiguration",
    :sources => "sources",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



102
103
104
105
106
107
108
109
110
111
112
113
114
115
# File 'ram/cfn_resource_share_props.rb', line 102

def to_jsii
  result = {}
  result.merge!({
    "name" => @name,
    "allowExternalPrincipals" => @allow_external_principals,
    "permissionArns" => @permission_arns,
    "principals" => @principals,
    "resourceArns" => @resource_arns,
    "resourceShareConfiguration" => @resource_share_configuration,
    "sources" => @sources,
    "tags" => @tags,
  })
  result.compact
end