awsarnutils

package module
v2.1.17 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2022 License: MIT Imports: 3 Imported by: 0

README

CI PkgGoDev

go-aws-arn-utils

Utilities to extract more detailed components from AWS ARNs.

Install

go get github.com/aereal/go-aws-arn-utils

Usage

Timestream
import (
  "github.com/aereal/go-aws-arn-utils"
)

dbName, tableName, err := awsarnutils.ParseTimestreamTableARN("arn:aws:timestream:us-east-1:1234567890:database/db1/table/table1")
// dbName = "db1", tableName = "table1"

License

See LICENSE file.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrInvalidService indicates the ARN is not an expected one
	ErrInvalidService = errors.New("invalid ARN: service is incorrect")

	// ErrIllFormedResource indicates resource part of the ARN is not an expected one
	ErrIllFormedResource = errors.New("invalid ARN: resource part is ill-formed")
)

Functions

func ParseECSServiceARN

func ParseECSServiceARN(serviceARN string) (clusterName, serviceName string, err error)

ParseECSServiceARN extracts ECS cluster name and service name from serviceARN

func ParseTimestreamTableARN

func ParseTimestreamTableARN(tableArn string) (databaseName string, tableName string, err error)

ParseTimestreamTableARN extracts Timestream database name and table name from tableArn

Types

This section is empty.

Jump to

Keyboard shortcuts

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