arnutil

package
v0.0.0-...-4834d5f Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package arnutil provides utility functions for AWS ARNs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BaseSNSArn

func BaseSNSArn(instanceProfileArn arn.ARN, region string) (string, error)

BaseSNSArn calculates the base SNS arn given an instance's arn

func DetectARNPrefix

func DetectARNPrefix(sess *session.Session) (string, error)

DetectARNPrefix uses the EC2 metadata API to determine the current prefix.

func GetRegionFromARN

func GetRegionFromARN(arnString string) string

GetRegionFromARN is a helper function to get region from ARNs

func InstanceProfileArn

func InstanceProfileArn(svc *ec2metadata.EC2Metadata) (arn.ARN, error)

InstanceProfileArn uses the EC2 metadata API to find the role for the instance.

func ValidateARN

func ValidateARN(arnString string) bool

ValidateARN is a helper function to validate ARNs

func ValidateRegionString

func ValidateRegionString(region string) bool

ValidateRegionString is a helper function to validate the region string

Types

This section is empty.

Jump to

Keyboard shortcuts

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