policy

package
v1.1.34 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 22, 2023 License: Unlicense Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// Allow to grant access of the resource and actions to the principals described in the policy statement
	Allow = Effect("Allow")

	// Deny to deny access of the resource and actions from the principals described in the policy statement
	Deny = Effect("Deny")
)
View Source
var (

	// SQS actions
	AddPermission              = Action("sqs:AddPermission")
	ChangeMessageVisibility    = Action("sqs:ChangeMessageVisibility")
	CreateQueue                = Action("sqs:CreateQueue")
	DeleteMessage              = Action("sqs:DeleteMessage")
	DeleteQueue                = Action("sqs:DeleteQueue")
	GetQueueAttributes         = Action("sqs:GetQueueAttributes")
	GetQueueUrl                = Action("sqs:GetQueueUrl")
	ListDeadLetterSourceQueues = Action("sqs:ListDeadLetterSourceQueues")
	ListQueues                 = Action("sqs:ListQueues")
	ListQueueTags              = Action("sqs:ListQueueTags")
	PurgeQueue                 = Action("sqs:PurgeQueue")
	ReceiveMessage             = Action("sqs:ReceiveMessage")
	RemovePermission           = Action("sqs:RemovePermission")
	SendMessage                = Action("sqs:SendMessage")
	SetQueueAttributes         = Action("sqs:SetQueueAttributes")
	TagQueue                   = Action("sqs:TagQueue")
	UntagQueue                 = Action("sqs:UntagQueue")
	SqsAll                     = Action("sqs:*")

	// KMS actions
	CancelKeyDeletion                   = Action("kms:CancelKeyDeletion")
	ConnectCustomKeyStore               = Action("kms:ConnectCustomKeyStore")
	CreateAlias                         = Action("kms:CreateAlias")
	CreateCustomKeyStore                = Action("kms:CreateCustomKeyStore")
	CreateGrant                         = Action("kms:CreateGrant")
	CreateKey                           = Action("kms:CreateKey")
	Decrypt                             = Action("kms:Decrypt")
	DeleteAlias                         = Action("kms:DeleteAlias")
	DeleteCustomKeyStore                = Action("kms:DeleteCustomKeyStore")
	DeleteImportedKeyMaterial           = Action("kms:DeleteImportedKeyMaterial")
	DescribeCustomKeyStores             = Action("kms:DescribeCustomKeyStores")
	DescribeKey                         = Action("kms:DescribeKey")
	DisableKey                          = Action("kms:DisableKey")
	DisableKeyRotation                  = Action("kms:DisableKeyRotation")
	DisconnectCustomKeyStore            = Action("kms:DisconnectCustomKeyStore")
	EnableKey                           = Action("kms:EnableKey")
	EnableKeyRotation                   = Action("kms:EnableKeyRotation")
	Encrypt                             = Action("kms:Encrypt")
	GenerateDataKey                     = Action("kms:GenerateDataKey")
	GenerateDataKeyPair                 = Action("kms:GenerateDataKeyPair")
	GenerateDataKeyPairWithoutPlaintext = Action("kms:GenerateDataKeyPairWithoutPlaintext")
	GenerateDataKeyWithoutPlaintext     = Action("kms:GenerateDataKeyWithoutPlaintext")
	GenerateMac                         = Action("kms:GenerateMac")
	GenerateRandom                      = Action("kms:GenerateRandom")
	GetKeyPolicy                        = Action("kms:GetKeyPolicy")
	GetKeyRotationStatus                = Action("kms:GetKeyRotationStatus")
	GetParametersForImport              = Action("kms:GetParametersForImport")
	GetPublicKey                        = Action("kms:GetPublicKey")
	ImportKeyMaterial                   = Action("kms:ImportKeyMaterial")
	ListAliases                         = Action("kms:ListAliases")
	ListGrants                          = Action("kms:ListGrants")
	ListKeyPolicies                     = Action("kms:ListKeyPolicies")
	ListKeys                            = Action("kms:ListKeys")
	ListResourceTags                    = Action("kms:ListResourceTags")
	ListRetirableGrants                 = Action("kms:ListRetirableGrants")
	PutKeyPolicy                        = Action("kms:PutKeyPolicy")
	ReEncryptFrom                       = Action("kms:ReEncryptFrom")
	ReEncryptTo                         = Action("kms:ReEncryptTo")
	ReplicateKey                        = Action("kms:ReplicateKey")
	RetireGrant                         = Action("kms:RetireGrant")
	RevokeGrant                         = Action("kms:RevokeGrant")
	ScheduleKeyDeletion                 = Action("kms:ScheduleKeyDeletion")
	Sign                                = Action("kms:Sign")
	TagResource                         = Action("kms:TagResource")
	UntagResource                       = Action("kms:UntagResource")
	UpdateAlias                         = Action("kms:UpdateAlias")
	UpdateCustomKeyStore                = Action("kms:UpdateCustomKeyStore")
	UpdateKeyDescription                = Action("kms:UpdateKeyDescription")
	UpdatePrimaryRegion                 = Action("kms:UpdatePrimaryRegion")
	Verify                              = Action("kms:Verify")
	VerifyMac                           = Action("kms:VerifyMac")
	KmsAll                              = Action("kms:*")
)

Describes the various action types available to AWS

Functions

This section is empty.

Types

type Action

type Action string

Action describes a valid operation that may be made against a particular AWS resource

type Actions

type Actions []Action

Actions describes a list of actions that may or may not be taken by principals with regard to the resources described in a policy statement

func (Actions) MarshalJSON

func (a Actions) MarshalJSON() ([]byte, error)

MarshalJSON converts an Actions collection to JSON

type Effect

type Effect string

Effect describes the effect a policy statement will have upon the resource and for the actions described

type Policy

type Policy struct {
	Version    string       `json:"Version"`
	ID         string       `json:"Id"`
	Statements []*Statement `json:"Statement"`
}

Policy describes a policy document that can be used to configure permissions in IAM

type Principals

type Principals []string

Principals describes a list of principals associated with a policy statement

func (Principals) MarshalJSON

func (p Principals) MarshalJSON() ([]byte, error)

MarhsalJSON converts a Principals collection to JSON

type Resources

type Resources []string

Resources describes a list of resources effected by the policy statement

func (Resources) MarshalJSON

func (r Resources) MarshalJSON() ([]byte, error)

MarshalJSON converts a Resources collection to JSON

type Statement

type Statement struct {
	ID            string     `json:"Sid"`
	Effect        Effect     `json:"Effect"`
	PrincipalArns Principals `json:"Principal"`
	ActionArns    Actions    `json:"Action"`
	ResourceArns  Resources  `json:"Resource"`
}

Statement describes a set of permissions that define what resources and users should have access to the resources described therein

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL