Class: AWSCDK::IAM::CfnRole::PolicyProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
iam/cfn_role.rb

Overview

Contains information about an attached policy.

An attached policy is a managed policy that has been attached to a user, group, or role.

For more information about managed policies, refer to Managed Policies and Inline Policies in the IAM User Guide .

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(policy_document:, policy_name:) ⇒ PolicyProperty

Returns a new instance of PolicyProperty.

Parameters:

  • policy_document (Object)

    The entire contents of the policy that defines permissions.

  • policy_name (String)

    The friendly name (not ARN) identifying the policy.



644
645
646
647
648
649
# File 'iam/cfn_role.rb', line 644

def initialize(policy_document:, policy_name:)
  @policy_document = policy_document
  Jsii::Type.check_type(@policy_document, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "policyDocument")
  @policy_name = policy_name
  Jsii::Type.check_type(@policy_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "policyName")
end

Instance Attribute Details

#policy_documentObject (readonly)

The entire contents of the policy that defines permissions.

For more information, see Overview of JSON policies .



657
658
659
# File 'iam/cfn_role.rb', line 657

def policy_document
  @policy_document
end

#policy_nameString (readonly)

The friendly name (not ARN) identifying the policy.



662
663
664
# File 'iam/cfn_role.rb', line 662

def policy_name
  @policy_name
end

Class Method Details

.jsii_propertiesObject



664
665
666
667
668
669
# File 'iam/cfn_role.rb', line 664

def self.jsii_properties
  {
    :policy_document => "policyDocument",
    :policy_name => "policyName",
  }
end

Instance Method Details

#to_jsiiObject



671
672
673
674
675
676
677
678
# File 'iam/cfn_role.rb', line 671

def to_jsii
  result = {}
  result.merge!({
    "policyDocument" => @policy_document,
    "policyName" => @policy_name,
  })
  result.compact
end