Class: AWSCDK::OAM::CfnSinkProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
oam/cfn_sink_props.rb

Overview

Properties for defining a CfnSink.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, policy: nil, tags: nil) ⇒ CfnSinkProps

Returns a new instance of CfnSinkProps.

Parameters:

  • name (String)

    A name for the sink.

  • policy (Object, nil) (defaults to: nil)

    The IAM policy that grants permissions to source accounts to link to this sink.

  • tags (Hash{String => String}, nil) (defaults to: nil)

    An array of key-value pairs to apply to the sink.



12
13
14
15
16
17
18
19
# File 'oam/cfn_sink_props.rb', line 12

def initialize(name:, policy: nil, tags: nil)
  @name = name
  Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name")
  @policy = policy
  Jsii::Type.check_type(@policy, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "policy") unless @policy.nil?
  @tags = tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoibWFwIn19")), "tags") unless @tags.nil?
end

Instance Attribute Details

#nameString (readonly)

A name for the sink.



25
26
27
# File 'oam/cfn_sink_props.rb', line 25

def name
  @name
end

#policyObject? (readonly)

The IAM policy that grants permissions to source accounts to link to this sink.

The policy can grant permission in the following ways:

  • Include organization IDs or organization paths to permit all accounts in an organization
  • Include account IDs to permit the specified accounts


35
36
37
# File 'oam/cfn_sink_props.rb', line 35

def policy
  @policy
end

#tagsHash{String => String}? (readonly)

An array of key-value pairs to apply to the sink.

For more information, see Tag .



42
43
44
# File 'oam/cfn_sink_props.rb', line 42

def tags
  @tags
end

Class Method Details

.jsii_propertiesObject



44
45
46
47
48
49
50
# File 'oam/cfn_sink_props.rb', line 44

def self.jsii_properties
  {
    :name => "name",
    :policy => "policy",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



52
53
54
55
56
57
58
59
60
# File 'oam/cfn_sink_props.rb', line 52

def to_jsii
  result = {}
  result.merge!({
    "name" => @name,
    "policy" => @policy,
    "tags" => @tags,
  })
  result.compact
end