Class: AWSCDK::IAM::CfnUser::PolicyProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
iam/cfn_user.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.



665
666
667
668
669
670
# File 'iam/cfn_user.rb', line 665

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 .



678
679
680
# File 'iam/cfn_user.rb', line 678

def policy_document
  @policy_document
end

#policy_nameString (readonly)

The friendly name (not ARN) identifying the policy.



683
684
685
# File 'iam/cfn_user.rb', line 683

def policy_name
  @policy_name
end

Class Method Details

.jsii_propertiesObject



685
686
687
688
689
690
# File 'iam/cfn_user.rb', line 685

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

Instance Method Details

#to_jsiiObject



692
693
694
695
696
697
698
699
# File 'iam/cfn_user.rb', line 692

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