Class: AWSCDK::OpenSearchServerless::CfnAccessPolicyProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
open_search_serverless/cfn_access_policy_props.rb

Overview

Properties for defining a CfnAccessPolicy.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, policy:, type:, description: nil) ⇒ CfnAccessPolicyProps

Returns a new instance of CfnAccessPolicyProps.

Parameters:

  • name (String)

    The name of the policy.

  • policy (String)

    The JSON policy document without any whitespaces.

  • type (String)

    The type of access policy.

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

    The description of the policy.



13
14
15
16
17
18
19
20
21
22
# File 'open_search_serverless/cfn_access_policy_props.rb', line 13

def initialize(name:, policy:, type:, description: 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("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "policy")
  @type = type
  Jsii::Type.check_type(@type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "type")
  @description = description
  Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil?
end

Instance Attribute Details

#descriptionString? (readonly)

The description of the policy.



45
46
47
# File 'open_search_serverless/cfn_access_policy_props.rb', line 45

def description
  @description
end

#nameString (readonly)

The name of the policy.



28
29
30
# File 'open_search_serverless/cfn_access_policy_props.rb', line 28

def name
  @name
end

#policyString (readonly)

The JSON policy document without any whitespaces.



33
34
35
# File 'open_search_serverless/cfn_access_policy_props.rb', line 33

def policy
  @policy
end

#typeString (readonly)

The type of access policy.

Currently the only option is data .



40
41
42
# File 'open_search_serverless/cfn_access_policy_props.rb', line 40

def type
  @type
end

Class Method Details

.jsii_propertiesObject



47
48
49
50
51
52
53
54
# File 'open_search_serverless/cfn_access_policy_props.rb', line 47

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

Instance Method Details

#to_jsiiObject



56
57
58
59
60
61
62
63
64
65
# File 'open_search_serverless/cfn_access_policy_props.rb', line 56

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