arn

package
v1.50.11 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsARN

func IsARN(s string) bool

IsARN returns whether the given string is an ARN

func SplitResource

func SplitResource(v string) []string

SplitResource splits the resource components by the ARN resource delimiters.

Types

type AccessPointARN

type AccessPointARN struct {
	arn.ARN
	AccessPointName string
}

AccessPointARN provides representation

func ParseAccessPointResource

func ParseAccessPointResource(a arn.ARN, resParts []string) (AccessPointARN, error)

ParseAccessPointResource attempts to parse the ARN's resource as an AccessPoint resource.

Supported Access point resource format:

  • Access point format: arn:{partition}:s3:{region}:{accountId}:accesspoint/{accesspointName}
  • example: arn.aws.s3.us-west-2.012345678901:accesspoint/myaccesspoint

func (AccessPointARN) GetARN

func (a AccessPointARN) GetARN() arn.ARN

GetARN returns the base ARN for the Access Point resource

type InvalidARNError

type InvalidARNError struct {
	ARN    arn.ARN
	Reason string
}

InvalidARNError provides the error for an invalid ARN error.

func (InvalidARNError) Error

func (e InvalidARNError) Error() string

Error returns a string denoting the occurred InvalidARNError

type OutpostARN

type OutpostARN interface {
	Resource
	GetOutpostID() string
}

OutpostARN interface that should be satisfied by outpost ARNs

func ParseOutpostARNResource

func ParseOutpostARNResource(a arn.ARN, resParts []string) (OutpostARN, error)

ParseOutpostARNResource will parse a provided ARNs resource using the appropriate ARN format and return a specific OutpostARN type

Currently supported outpost ARN formats: * Outpost AccessPoint ARN format:

  • ARN format: arn:{partition}:s3-outposts:{region}:{accountId}:outpost/{outpostId}/accesspoint/{accesspointName}
  • example: arn:aws:s3-outposts:us-west-2:012345678901:outpost/op-1234567890123456/accesspoint/myaccesspoint

* Outpost Bucket ARN format:

  • ARN format: arn:{partition}:s3-outposts:{region}:{accountId}:outpost/{outpostId}/bucket/{bucketName}
  • example: arn:aws:s3-outposts:us-west-2:012345678901:outpost/op-1234567890123456/bucket/mybucket

Other outpost ARN formats may be supported and added in the future.

type OutpostAccessPointARN

type OutpostAccessPointARN struct {
	AccessPointARN
	OutpostID string
}

OutpostAccessPointARN represents outpost access point ARN.

func (OutpostAccessPointARN) GetOutpostID

func (o OutpostAccessPointARN) GetOutpostID() string

GetOutpostID returns the outpost id of outpost access point arn

type OutpostBucketARN

type OutpostBucketARN struct {
	arn.ARN
	BucketName string
	OutpostID  string
}

OutpostBucketARN represents the outpost bucket ARN.

func (OutpostBucketARN) GetARN

func (o OutpostBucketARN) GetARN() arn.ARN

GetARN retrives the base ARN from outpost bucket ARN resource

func (OutpostBucketARN) GetOutpostID

func (o OutpostBucketARN) GetOutpostID() string

GetOutpostID returns the outpost id of outpost bucket arn

type Resource

type Resource interface {
	GetARN() arn.ARN
	String() string
}

Resource provides the interfaces abstracting ARNs of specific resource types.

func ParseResource

func ParseResource(s string, resParser ResourceParser) (resARN Resource, err error)

ParseResource parses an AWS ARN into a typed resource for the S3 API.

type ResourceParser

type ResourceParser func(arn.ARN) (Resource, error)

ResourceParser provides the function for parsing an ARN's resource component into a typed resource.

type S3ObjectLambdaARN added in v1.38.0

type S3ObjectLambdaARN interface {
	Resource
	// contains filtered or unexported methods
}

S3ObjectLambdaARN represents an ARN for the s3-object-lambda service

type S3ObjectLambdaAccessPointARN added in v1.38.0

type S3ObjectLambdaAccessPointARN struct {
	AccessPointARN
}

S3ObjectLambdaAccessPointARN is an S3ObjectLambdaARN for the Access Point resource type

Jump to

Keyboard shortcuts

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