Documentation ¶
Index ¶
- func AssumeRole(roleSessionName string, stsClient STSRoleAssumer, roleArn string) (*types.Credentials, error)
- func AssumeRoleSequence(roleSessionName string, seedClient STSRoleAssumer, roleArnSequence []string, ...) (*types.Credentials, error)
- func AssumeRoleWithJWT(jwt string, roleArn string, stsClient STSRoleWithWebIdentityAssumer) (*types.Credentials, error)
- func StsClientWithProxy(proxyURL string) (*sts.Client, error)
- type AWSCredentialsResponse
- type STSClientProviderFunc
- type STSRoleAssumer
- type STSRoleWithWebIdentityAssumer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssumeRole ¶
func AssumeRole(roleSessionName string, stsClient STSRoleAssumer, roleArn string) (*types.Credentials, error)
func AssumeRoleSequence ¶
func AssumeRoleSequence(roleSessionName string, seedClient STSRoleAssumer, roleArnSequence []string, proxyURL string, stsClientProviderFunc STSClientProviderFunc) (*types.Credentials, error)
func AssumeRoleWithJWT ¶
func AssumeRoleWithJWT(jwt string, roleArn string, stsClient STSRoleWithWebIdentityAssumer) (*types.Credentials, error)
Types ¶
type AWSCredentialsResponse ¶
type AWSCredentialsResponse struct { AccessKeyID string `json:"AccessKeyID" yaml:"AccessKeyID"` SecretAccessKey string `json:"SecretAccessKey" yaml:"SecretAccessKey"` SessionToken string `json:"SessionToken" yaml:"SessionToken"` Region string `json:"Region,omitempty" yaml:"Region,omitempty"` Expiration string `json:"Expiration,omitempty" yaml:"Expiration,omitempty"` }
func (AWSCredentialsResponse) EnvFormat ¶
func (r AWSCredentialsResponse) EnvFormat() string
func (AWSCredentialsResponse) RenderOutput ¶
func (r AWSCredentialsResponse) RenderOutput(outputFormat string) (string, error)
type STSClientProviderFunc ¶
type STSClientProviderFunc func(optFns ...func(*config.LoadOptions) error) (STSRoleAssumer, error)
var DefaultSTSClientProviderFunc STSClientProviderFunc = func(optnFns ...func(options *config.LoadOptions) error) (STSRoleAssumer, error) { cfg, err := config.LoadDefaultConfig(context.TODO(), optnFns...) if err != nil { return nil, fmt.Errorf("failed to load default AWS config: %w", err) } return sts.NewFromConfig(cfg), nil }
type STSRoleAssumer ¶
type STSRoleAssumer interface {
AssumeRole(ctx context.Context, params *sts.AssumeRoleInput, optFns ...func(*sts.Options)) (*sts.AssumeRoleOutput, error)
}
type STSRoleWithWebIdentityAssumer ¶
type STSRoleWithWebIdentityAssumer interface {
AssumeRoleWithWebIdentity(ctx context.Context, params *sts.AssumeRoleWithWebIdentityInput, optFns ...func(*sts.Options)) (*sts.AssumeRoleWithWebIdentityOutput, error)
}
Click to show internal directories.
Click to hide internal directories.