Documentation ¶
Index ¶
- Constants
- Variables
- func CreatePolicyDocumentCreateRoleWithTrustedUserARN(roleName string, trustedUserARN string) policy.Policy
- func ParsePolicy(b []byte) (*policy.Policy, error)
- type CreatePolicyInput
- type CreateRoleInput
- type CreateUserInput
- type IAMService
- type PolicyService
- type RoleService
- type UserService
Constants ¶
const (
ActionSTSAssumeRole = "sts:AssumeRole"
)
Variables ¶
Functions ¶
Types ¶
type CreatePolicyInput ¶
type CreatePolicyInput struct { PolicyName string // required PolicyDocument policy.Policy // required Description *string Path *string Tags []types.Tag }
CreatePolicyInput is a representation of the AWS v2 SDK Create Policy Input where the Policy Name is required as a string and the Policy Document is required as a struct (vs. string). See more at: https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/iam#CreatePolicyInput , https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_grammar.html .
func (CreatePolicyInput) Request ¶
func (input CreatePolicyInput) Request() (*iam.CreatePolicyInput, error)
type CreateRoleInput ¶
type CreateRoleInput struct { RoleName string // required AssumeRolePolicyDocument policy.Policy // required iam.CreateRoleInput }
CreateRoleInput is a representation of the AWS v2 SDK Create Role Input where the AssumeRolePolicyDocument required as a `policy.Policy` struct.
func (CreateRoleInput) Request ¶
func (input CreateRoleInput) Request() (*iam.CreateRoleInput, error)
type CreateUserInput ¶
type CreateUserInput struct { UserName string // required iam.CreateUserInput }
CreateRoleInput is a representation of the AWS v2 SDK Create Uuser Input where the UserName property is required.
func (CreateUserInput) Request ¶
func (input CreateUserInput) Request() (*iam.CreateUserInput, error)
type IAMService ¶
type IAMService struct { AWSIAMClient *iam.Client Policies *PolicyService Roles *RoleService Users *UserService }
func NewIAMService ¶
type PolicyService ¶
func (PolicyService) Create ¶
func (svc PolicyService) Create(ctx context.Context, params CreatePolicyInput, optFns ...func(*iam.Options)) (*types.Policy, *iam.CreatePolicyOutput, error)
CreatePolicy https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/iam https://docs.aws.amazon.com/code-library/latest/ug/go_2_iam_code_examples.html
type RoleService ¶
func (RoleService) Create ¶
func (svc RoleService) Create(ctx context.Context, params CreateRoleInput, optFns ...func(*iam.Options)) (*types.Role, *iam.CreateRoleOutput, error)
Create used used to create a role. https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/iam https://docs.aws.amazon.com/code-library/latest/ug/go_2_iam_code_examples.html
type UserService ¶
func (UserService) Create ¶
func (svc UserService) Create(ctx context.Context, params CreateUserInput, optFns ...func(*iam.Options)) (*types.User, *iam.CreateUserOutput, error)
Create used used to create a user. https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/iam https://docs.aws.amazon.com/code-library/latest/ug/go_2_iam_code_examples.html
func (UserService) CreateSimple ¶
func (svc UserService) CreateSimple(ctx context.Context, username string, params *CreateUserInput, optFns ...func(*iam.Options)) (*types.User, *iam.CreateUserOutput, error)