utils

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2019 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ARN

type ARN struct {
	// The partition that the resource is in.
	Partition string

	// The service namespace that identifies the product (for example, RAM).
	Service string

	// The region the resource resides in. Note that the ARNs for some resources do not require a region, so this
	// component might be omitted.
	Region string

	// The ID of the RAM account that owns the resource, without the hyphens. For example, 123456789012. Note that the
	// ARNs for some resources don't require an account number, so this component might be omitted.
	AccountID string

	// The content of this part of the ARN varies by service.
	Resource string
}

ARN captures the individual fields of an RAM Resource Name.

func Parse

func Parse(arn string) (ARN, error)

Parse parses an ARN into its constituent parts.

Some example ARNs: acs:ram::123456789012:user/David acs:ram::123456789012:role/Defaultrole​​​

func (ARN) String

func (arn ARN) String() string

String returns the canonical representation of the ARN

Jump to

Keyboard shortcuts

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