Class: AWSCDK::EntityResolution::CfnPolicyStatementProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
entity_resolution/cfn_policy_statement_props.rb

Overview

Properties for defining a CfnPolicyStatement.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(arn:, statement_id:, action: nil, condition: nil, effect: nil, principal: nil) ⇒ CfnPolicyStatementProps

Returns a new instance of CfnPolicyStatementProps.

Parameters:

  • arn (String)

    The Amazon Resource Name (ARN) of the resource that will be accessed by the principal.

  • statement_id (String)

    A statement identifier that differentiates the statement from others in the same policy.

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

    The action that the principal can use on the resource.

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

    A set of condition keys that you can use in key policies.

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

    Determines whether the permissions specified in the policy are to be allowed ( Allow ) or denied ( Deny ).

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

    The AWS service or AWS account that can access the resource defined as ARN.



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

def initialize(arn:, statement_id:, action: nil, condition: nil, effect: nil, principal: nil)
  @arn = arn
  Jsii::Type.check_type(@arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "arn")
  @statement_id = statement_id
  Jsii::Type.check_type(@statement_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "statementId")
  @action = action
  Jsii::Type.check_type(@action, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "action") unless @action.nil?
  @condition = condition
  Jsii::Type.check_type(@condition, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "condition") unless @condition.nil?
  @effect = effect
  Jsii::Type.check_type(@effect, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "effect") unless @effect.nil?
  @principal = principal
  Jsii::Type.check_type(@principal, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "principal") unless @principal.nil?
end

Instance Attribute Details

#actionArray<String>? (readonly)

The action that the principal can use on the resource.

For example, entityresolution:GetIdMappingJob , entityresolution:GetMatchingJob .



46
47
48
# File 'entity_resolution/cfn_policy_statement_props.rb', line 46

def action
  @action
end

#arnString (readonly)

The Amazon Resource Name (ARN) of the resource that will be accessed by the principal.



34
35
36
# File 'entity_resolution/cfn_policy_statement_props.rb', line 34

def arn
  @arn
end

#conditionString? (readonly)

A set of condition keys that you can use in key policies.



51
52
53
# File 'entity_resolution/cfn_policy_statement_props.rb', line 51

def condition
  @condition
end

#effectString? (readonly)

Determines whether the permissions specified in the policy are to be allowed ( Allow ) or denied ( Deny ).

If you set the value of the effect parameter to Deny for the AddPolicyStatement operation, you must also set the value of the effect parameter in the policy to Deny for the PutPolicy operation.



58
59
60
# File 'entity_resolution/cfn_policy_statement_props.rb', line 58

def effect
  @effect
end

#principalArray<String>? (readonly)

The AWS service or AWS account that can access the resource defined as ARN.



63
64
65
# File 'entity_resolution/cfn_policy_statement_props.rb', line 63

def principal
  @principal
end

#statement_idString (readonly)

A statement identifier that differentiates the statement from others in the same policy.



39
40
41
# File 'entity_resolution/cfn_policy_statement_props.rb', line 39

def statement_id
  @statement_id
end

Class Method Details

.jsii_propertiesObject



65
66
67
68
69
70
71
72
73
74
# File 'entity_resolution/cfn_policy_statement_props.rb', line 65

def self.jsii_properties
  {
    :arn => "arn",
    :statement_id => "statementId",
    :action => "action",
    :condition => "condition",
    :effect => "effect",
    :principal => "principal",
  }
end

Instance Method Details

#to_jsiiObject



76
77
78
79
80
81
82
83
84
85
86
87
# File 'entity_resolution/cfn_policy_statement_props.rb', line 76

def to_jsii
  result = {}
  result.merge!({
    "arn" => @arn,
    "statementId" => @statement_id,
    "action" => @action,
    "condition" => @condition,
    "effect" => @effect,
    "principal" => @principal,
  })
  result.compact
end