Class: AWSCDK::BedrockAgentCore::CfnPolicy::PolicyDefinitionProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
bedrock_agent_core/cfn_policy.rb

Overview

The definition structure for policies.

Encapsulates different policy formats.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(cedar: nil, policy: nil) ⇒ PolicyDefinitionProperty

Returns a new instance of PolicyDefinitionProperty.

Parameters:



647
648
649
650
651
652
# File 'bedrock_agent_core/cfn_policy.rb', line 647

def initialize(cedar: nil, policy: nil)
  @cedar = cedar.is_a?(Hash) ? ::AWSCDK::BedrockAgentCore::CfnPolicy::CedarPolicyProperty.new(**cedar.transform_keys(&:to_sym)) : cedar
  Jsii::Type.check_type(@cedar, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iZWRyb2NrYWdlbnRjb3JlLkNmblBvbGljeS5DZWRhclBvbGljeVByb3BlcnR5In1dfX0=")), "cedar") unless @cedar.nil?
  @policy = policy.is_a?(Hash) ? ::AWSCDK::BedrockAgentCore::CfnPolicy::PolicyStatementProperty.new(**policy.transform_keys(&:to_sym)) : policy
  Jsii::Type.check_type(@policy, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iZWRyb2NrYWdlbnRjb3JlLkNmblBvbGljeS5Qb2xpY3lTdGF0ZW1lbnRQcm9wZXJ0eSJ9XX19")), "policy") unless @policy.nil?
end

Instance Attribute Details

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

A Cedar policy statement within the AgentCore Policy system.



658
659
660
# File 'bedrock_agent_core/cfn_policy.rb', line 658

def cedar
  @cedar
end

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

A policy statement within the AgentCore Policy system.



663
664
665
# File 'bedrock_agent_core/cfn_policy.rb', line 663

def policy
  @policy
end

Class Method Details

.jsii_propertiesObject



665
666
667
668
669
670
# File 'bedrock_agent_core/cfn_policy.rb', line 665

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

Instance Method Details

#to_jsiiObject



672
673
674
675
676
677
678
679
# File 'bedrock_agent_core/cfn_policy.rb', line 672

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