sts

package
v0.0.0-...-9f55c91 Latest Latest
Warning

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

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

Documentation

Overview

Package sts provides primitives to simplify STS AssumeRole functionality.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MustAwsSession

func MustAwsSession(roleARN, externalID, region string) (*session.Session, *aws.Config)

MustAwsSession is a helper function that creates a new AWS Session and optional configuration This function is intended to be used to create AWS Client for any service for example,

sts.New(sts.MustAwsSession(roleARN, externalID, region))

Types

type AssumeRoleInRegion

type AssumeRoleInRegion struct {
	Arn        string `json:"role-arn"`
	ExternalID string `json:"external-id"`
	Region     string `json:"region"`
}

AssumeRoleInRegion role to assume in the region (with external ID)

type Identifier

type Identifier interface {
	GetIdentity(ctx context.Context) (string, error)
}

Identifier interface

func NewIdentifier

func NewIdentifier(role AssumeRoleInRegion) Identifier

NewIdentifier creates a new Identifier

Jump to

Keyboard shortcuts

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