Documentation ¶
Overview ¶
Package policy provides a custom function to unmarshal AWS policies.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Policy ¶
type Policy struct { Version string `json:"Version"` ID string `json:"-"` Statements []Statement `json:"Statement"` }
Policy represents an AWS IAM policy document
func GetAWSPolicy ¶
GetAWSPolicy retrieves an AWS policy by its ARN.
func (*Policy) UnmarshalJSON ¶
UnmarshalJSON decodifies input JSON info to awsPolicy type
type Statement ¶
type Statement struct { StatementID string `json:"Sid,omitempty"` // Statement ID, service specific Effect string `json:"Effect"` // Allow or Deny Principal map[string][]string `json:"Principal,omitempty"` // principal that is allowed or denied NotPrincipal map[string][]string `json:"NotPrincipal,omitempty"` // exception to a list of principals Action []string `json:"Action"` // allowed or denied action NotAction []string `json:"NotAction,omitempty"` // matches everything except Resource []string `json:"Resource,omitempty"` // object or objects that the statement covers NotResource []string `json:"NotResource,omitempty"` // matches everything except Condition map[string]any `json:"Condition,omitempty"` // conditions for when a policy is in effect }
Statement represents the body of an AWS IAM policy document
Click to show internal directories.
Click to hide internal directories.