arn

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KeyResourceType = "key"
)

Variables

View Source
var ErrMalformedArn = errors.New("malformed Key ARN")

Functions

func FilterKeyIDs added in v0.1.0

func FilterKeyIDs(f FilterFunc, keyIDs []string) ([]string, error)

func IsMrkArnEqual added in v0.1.0

func IsMrkArnEqual(key1, key2 string) bool

IsMrkArnEqual compares two MRK ARNs

Spec: aws-kms-mrk-match-for-decrypt

Given two KMS key arns, determines whether they refer to related KMS MRKs.

func IsValidMrkArn added in v0.1.0

func IsValidMrkArn(str string) (bool, error)

IsValidMrkArn checks if the given string can be a valid MRK ARN

Spec: aws-kms-key-arn

func IsValidMrkIdentifier added in v0.1.0

func IsValidMrkIdentifier(str string) (bool, error)

IsValidMrkIdentifier checks if the given string can be a valid MRK identifier

Spec: aws-kms-key-arn

func KeyResourceEqual added in v0.1.0

func KeyResourceEqual(key1, key2 string) (bool, error)

func ValidateKeyArn

func ValidateKeyArn(keyID string) error

Types

type FilterFunc added in v0.1.0

type FilterFunc func(s string) (bool, error)

type KeyArn

type KeyArn struct {
	Partition    string // AWS partition, e.g. aws, aws-cn, aws-us-gov
	Service      string // AWS service, kms
	Region       string // AWS region, us-east-1, eu-west-1
	Account      string // AWS account ID, 12 digits
	ResourceType string // AWS resource type, either "key" or "alias"
	ResourceID   string // AWS resource ID, resource ID or alias name
}

func ParseArn

func ParseArn(str string) (*KeyArn, error)

ParseArn Parses str string as an ARN (KeyArn).

func (*KeyArn) IsMrk added in v0.1.0

func (a *KeyArn) IsMrk() bool

IsMrk returns true if the ARN is a multi-region key (MRK) ARN, otherwise false.

func (*KeyArn) String

func (a *KeyArn) String() string

String returns the string representation of the ARN.

Jump to

Keyboard shortcuts

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