amazon

package
v0.0.0-...-e7c744b Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const Provider = "amazon"

Variables

This section is empty.

Functions

func AttachUserPolicy

func AttachUserPolicy(svc iamiface.IAMAPI, userName, policyArn *string) error

AttachUserPolicy attaches the policy identified by the given arn to the IAM user identified by the given name

func CreateAWSCredentials

func CreateAWSCredentials(values map[string]string) *credentials.Credentials

CreateAWSCredentials create a 'Credentials' instance from secret's values

func CreateEC2Client

func CreateEC2Client(credentials *credentials.Credentials, region string) (*ec2.EC2, error)

CreateEC2Client create a new ec2 instance with the credentials

func CreatePolicy

func CreatePolicy(svc iamiface.IAMAPI, policyName, policyDocument, policyDescription *string) (*iam.Policy, error)

CreatePolicy creates an AWS policy with given name, description and JSON policy document

func CreateUserAccessKey

func CreateUserAccessKey(svc iamiface.IAMAPI, userName *string) (*iam.AccessKey, error)

CreateUserAccessKey create Amazon access key for the IAM user identified by userName

func DeleteIAMUser

func DeleteIAMUser(svc iamiface.IAMAPI, userName *string) error

DeleteIAMUser deletes the Amazon IAM user with the given name

func DeletePolicy

func DeletePolicy(svc iamiface.IAMAPI, policyArn *string) error

DeletePolicy deletes the policy identified by the specified arn

func DeleteUserAccessKey

func DeleteUserAccessKey(svc iamiface.IAMAPI, userName, accessKeyId *string) error

DeleteUserAccessKey deletes the user access key identified by accessKeyId of user identified by userName

func DetachUserPolicy

func DetachUserPolicy(svc iamiface.IAMAPI, userName, policyArn *string) error

DetachUserPolicy detaches the access policy identified by policyArn from the IAM User identified by userName

func GetIAMUser

func GetIAMUser(svc iamiface.IAMAPI, userName *string) (*iam.User, error)

GetIAMUser retrieves the Amazon IAM user with the given user name

func GetPolicy

func GetPolicy(svc iamiface.IAMAPI, arn string) (*iam.Policy, error)

GetPolicy retrieves the IAM policy identified by the given Arn

func GetPolicyByName

func GetPolicyByName(svc iamiface.IAMAPI, policyName, scope string) (*iam.Policy, error)

GetPolicyByName retrieves the IAM policy identified by the given policy name

func GetUserAccessKeys

func GetUserAccessKeys(svc iamiface.IAMAPI, userName *string) ([]*iam.AccessKeyMetadata, error)

GetUserAccessKeys returns the list of Amazon access keys of the given IAM user

func IsUserPolicyAttached

func IsUserPolicyAttached(svc iamiface.IAMAPI, userName, policyArn *string) (bool, error)

IsUserPolicyAttached returns true is the policy given its Arn is attached to the specified IAM user

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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