iam

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateOrUpdateRole

func CreateOrUpdateRole(ctx context.Context, client *iam.Client, req CreateRoleRequest) error

func CreatePolicy

func CreatePolicy(ctx context.Context, client *iam.Client, req CreatePolicyRequest) (*types.Policy, error)

func CreateRole

func CreateRole(ctx context.Context, client *iam.Client, req CreateRoleRequest) error

func DeletePolicy

func DeletePolicy(ctx context.Context, client *iam.Client, arn string) error

func DeleteRole

func DeleteRole(ctx context.Context, client *iam.Client, name string) error

func DetachAllPoliciesFromRole

func DetachAllPoliciesFromRole(ctx context.Context, client *iam.Client, roleName string) error

func GetPolicy

func GetPolicy(ctx context.Context, client *iam.Client, arn string) (*types.Policy, error)

func GetRole

func GetRole(ctx context.Context, client *iam.Client, name string) (*types.Role, error)

func IsNotFoundError

func IsNotFoundError(err error) bool

Types

type CreatePolicyRequest

type CreatePolicyRequest struct {
	Name        string
	Description string
	Document    PolicyDocument
}

type CreateRoleRequest

type CreateRoleRequest struct {
	Name                     string
	AssumeRolePolicyDocument PolicyDocument
}

type PolicyCondition

type PolicyCondition struct {
	StringLike map[string][]string `json:",omitempty"`
}

type PolicyDocument

type PolicyDocument struct {
	Version   string
	Statement []PolicyStatement
}

type PolicyStatement

type PolicyStatement struct {
	Effect    string
	Action    []string
	Principal map[string]interface{} `json:",omitempty"`
	Resource  *string                `json:",omitempty"`
	Condition *PolicyCondition       `json:",omitempty"`
}

Jump to

Keyboard shortcuts

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