Class: Aws::IAMToolbox::Types::PolicyInfo

Inherits:
Struct
  • Object
show all
Defined in:
gems/aws-sdk-iamtoolbox/lib/aws-sdk-iamtoolbox/types.rb

Overview

Contains details about a policy evaluated during authorization. Details include the policy type, whether it is inline or managed, a URI that identifies it, the entities it is attached to, and its source, if present.

Constant Summary collapse

SENSITIVE =
[]

Instance Attribute Summary collapse

Instance Attribute Details

#attached_to ⇒ Array<Types::AttachedTo>

The entities that the policy is attached to. For identity, session, and resource-based policies, this is typically a single entity. For organization control policies (SCPs and RCPs), it can be multiple entities at different levels of the organization hierarchy.

Returns:



431
432
433
434
435
436
437
438
439
# File 'gems/aws-sdk-iamtoolbox/lib/aws-sdk-iamtoolbox/types.rb', line 431

class PolicyInfo < Struct.new(
  :type,
  :inline,
  :uri,
  :attached_to,
  :policy_source)
  SENSITIVE = []
  include Aws::Structure
end

#inline ⇒ Boolean

Specifies whether this is an inline policy (true) or a managed policy (false).

Returns:

  • (Boolean)


431
432
433
434
435
436
437
438
439
# File 'gems/aws-sdk-iamtoolbox/lib/aws-sdk-iamtoolbox/types.rb', line 431

class PolicyInfo < Struct.new(
  :type,
  :inline,
  :uri,
  :attached_to,
  :policy_source)
  SENSITIVE = []
  include Aws::Structure
end

#policy_source ⇒ Hash<String,String>

What the policy was built from, such as a KMS key policy or grant. Absent for other policies.

The type and typeName keys are always present. type identifies the policy-source kind. typeName is its readable name. Compare type, not typeName.

A policy source can include additional keys that depend on its type. For example, a KMS grant includes a grantId key that identifies the grant. A grant has no ARN. Use the grant ID with the KMS key ARN in attachedTo to find the grant with the AWS KMS ListGrants operation.

New types and keys can be added, so clients should ignore types and keys they don't recognize.

Returns:

  • (Hash<String,String>)


431
432
433
434
435
436
437
438
439
# File 'gems/aws-sdk-iamtoolbox/lib/aws-sdk-iamtoolbox/types.rb', line 431

class PolicyInfo < Struct.new(
  :type,
  :inline,
  :uri,
  :attached_to,
  :policy_source)
  SENSITIVE = []
  include Aws::Structure
end

#type ⇒ String

The type of policy. Valid values:

  • IDENTITY_BASED_POLICY - An identity-based policy attached to an IAM user, group, or role.

  • PERMISSIONS_BOUNDARY - A permissions boundary for an IAM entity.

  • RESOURCE_BASED_POLICY - A resource-based policy attached to a resource. An AWS service can evaluate and report a policy kind it defines, such as a KMS grant, as RESOURCE_BASED_POLICY. policySource identifies the kind.

  • RESOURCE_CONTROL_POLICY - A resource control policy (RCP) in AWS Organizations.

  • SERVICE_CONTROL_POLICY - A service control policy (SCP) in AWS Organizations.

  • SESSION_POLICY - A session policy passed during role assumption or federation.

  • VPC_ENDPOINT_POLICY - A VPC endpoint policy.

Returns:

  • (String)


431
432
433
434
435
436
437
438
439
# File 'gems/aws-sdk-iamtoolbox/lib/aws-sdk-iamtoolbox/types.rb', line 431

class PolicyInfo < Struct.new(
  :type,
  :inline,
  :uri,
  :attached_to,
  :policy_source)
  SENSITIVE = []
  include Aws::Structure
end

#uri ⇒ String

A URI that identifies the policy. Use this URI to cross-reference the policy with the matching policies in each evaluation. To retrieve the policy document, pass this URI as the policyUri parameter of GetRequestAuthorizationPolicy, together with the same authorization ID. The value depends on the policy type:

  • For managed policies, this is the policy ARN.

  • For inline policies, which have no ARN, this is an opaque identifier.

Returns:

  • (String)


431
432
433
434
435
436
437
438
439
# File 'gems/aws-sdk-iamtoolbox/lib/aws-sdk-iamtoolbox/types.rb', line 431

class PolicyInfo < Struct.new(
  :type,
  :inline,
  :uri,
  :attached_to,
  :policy_source)
  SENSITIVE = []
  include Aws::Structure
end