iamrole

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

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

Go to latest
Published: Jul 20, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AttachOptions

type AttachOptions struct {
	Name      string
	PolicyArn string
}

type AttachedPolicies

type AttachedPolicies []AttachedPolicy

func (*AttachedPolicies) Insert

func (p *AttachedPolicies) Insert(name, arn string)

func (*AttachedPolicies) Len

func (p *AttachedPolicies) Len() int

func (*AttachedPolicies) ToMap

func (p *AttachedPolicies) ToMap() PolicyMap

type AttachedPolicy

type AttachedPolicy struct {
	Name string
	Arn  string
}

type Client

type Client struct {
	// contains filtered or unexported fields
}

func New

func New(service pkgaws.IamRoleService, path string) *Client

func (*Client) AttachPolicy

func (c *Client) AttachPolicy(ctx context.Context, options *AttachOptions) error

func (*Client) Create

func (c *Client) Create(ctx context.Context, options *CreateOptions) (*IamRole, error)

func (*Client) Delete

func (c *Client) Delete(ctx context.Context, options *DeleteOptions) error

func (*Client) DetachPolicy

func (c *Client) DetachPolicy(ctx context.Context, options *DetachOptions) error

func (*Client) Get

func (c *Client) Get(ctx context.Context, options *GetOptions) (*IamRole, error)

func (*Client) ListAttachedPolicies

func (c *Client) ListAttachedPolicies(ctx context.Context, options *ListOptions) (AttachedPolicies, error)

func (*Client) Update

func (c *Client) Update(ctx context.Context, options *UpdateOptions) (*IamRole, error)

type CreateOptions

type CreateOptions struct {
	Name               string
	Description        string
	MaxDurationSeconds int32
	PolicyDocument     string
}

type DeleteOptions

type DeleteOptions struct {
	Name string
}

type DetachOptions

type DetachOptions = AttachOptions

type GetOptions

type GetOptions struct {
	Name string
}

type IamRole

type IamRole struct {
	Arn         string
	CreateDate  time.Time
	Description string
	Id          string
	Name        string
	TrustPolicy string
}

type Interface

type Interface interface {
	Create(ctx context.Context, options *CreateOptions) (*IamRole, error)
	Update(ctx context.Context, options *UpdateOptions) (*IamRole, error)
	Get(ctx context.Context, options *GetOptions) (*IamRole, error)
	Delete(ctx context.Context, options *DeleteOptions) error
	AttachPolicy(ctx context.Context, options *AttachOptions) error
	DetachPolicy(ctx context.Context, options *DetachOptions) error
	ListAttachedPolicies(ctx context.Context, options *ListOptions) (AttachedPolicies, error)
}

type ListOptions

type ListOptions = GetOptions

type PolicyMap

type PolicyMap map[string]string

func (PolicyMap) Contains

func (m PolicyMap) Contains(name string) bool

func (PolicyMap) Delete

func (m PolicyMap) Delete(name string) bool

func (PolicyMap) Get

func (m PolicyMap) Get(name string) (string, bool)

func (PolicyMap) Set

func (m PolicyMap) Set(name string, arn string)

type UpdateOptions

type UpdateOptions struct {
	Name               string
	Description        string
	MaxDurationSeconds int32
	PolicyDocument     string
}

Jump to

Keyboard shortcuts

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