Documentation ¶
Overview ¶
Package arn provides functions and types for working with Amazon Resource Names.
Index ¶
- Constants
- func String(r ARN) *string
- type ARN
- func (r ARN) Account() string
- func (r ARN) Ctx() Ctx
- func (r ARN) Field(i int) string
- func (r ARN) Name() string
- func (r ARN) Partition() string
- func (r ARN) Path() string
- func (r ARN) PathName() string
- func (r ARN) Region() string
- func (r ARN) Resource() string
- func (r ARN) Service() string
- func (r ARN) Type() string
- func (r ARN) Valid() bool
- func (r ARN) With(o ARN) ARN
- func (r ARN) WithAccount(v string) ARN
- func (r ARN) WithField(i int, v string) ARN
- func (r ARN) WithName(v string) ARN
- func (r ARN) WithPartition(v string) ARN
- func (r ARN) WithPath(v string) ARN
- func (r ARN) WithPathName(v string) ARN
- func (r ARN) WithRegion(v string) ARN
- func (r ARN) WithResource(v string) ARN
- func (r ARN) WithService(v string) ARN
- type Ctx
Constants ¶
const Base = ARN(prefix + "::::")
Base is an ARN without any fields set.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ARN ¶
type ARN string
ARN is an Amazon Resource Name.
func Value ¶
Value returns the value of the ARN string pointer passed in or "" if the pointer is nil.
func (ARN) Name ¶
Name returns the resource suffix after the last '/' or ':' character. It returns the whole resource field if neither character is found.
func (ARN) Path ¶
Path returns the resource substring between and including the first and last '/' characters. It ignores any part of the resource before the last ':' and returns an empty string if the resource does not contain any '/' characters.
func (ARN) PathName ¶
PathName returns the combined resource path and name. It panics if r does not have a path.
func (ARN) Type ¶
Type returns the resource prefix up to the first '/' or ':' character. It returns an empty string if neither character is found.
func (ARN) WithAccount ¶
WithAccount returns a new ARN with account replaced by v.
func (ARN) WithPartition ¶
WithPartition returns a new ARN with partition replaced by v.
func (ARN) WithPath ¶
WithPath returns a new ARN with path replaced by v. It panics if r does not have a path.
func (ARN) WithPathName ¶
WithPathName returns a new ARN with path and name replaced by v. It panics if r does not have a path.
func (ARN) WithRegion ¶
WithRegion returns a new ARN with region replaced by v.
func (ARN) WithResource ¶
WithResource returns a new ARN with resource replaced by v.
func (ARN) WithService ¶
WithService returns a new ARN with service replaced by v.