iampapv2

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

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 8 Imported by: 6

Documentation

Index

Constants

View Source
const ErrCodeAPICreation = "APICreationError"

ErrCodeAPICreation ...

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateRoleRequest

type CreateRoleRequest struct {
	Name        string   `json:"name"`
	ServiceName string   `json:"service_name"`
	AccountID   string   `json:"account_id"`
	DisplayName string   `json:"display_name"`
	Description string   `json:"description"`
	Actions     []string `json:"actions,omitempty"`
}

type IAMPAPAPIV2

type IAMPAPAPIV2 interface {
	IAMRoles() RoleRepository
}

IAMPAPAPIV2 is the resource client ...

func New

func New(sess *session.Session) (IAMPAPAPIV2, error)

New ...

type ListResponse

type ListResponse struct {
	CustomRoles  []Role `json:"custom_roles"`
	ServiceRoles []Role `json:"service_roles"`
	SystemRoles  []Role `json:"system_roles"`
}

type Role

type Role struct {
	CreateRoleRequest
	ID               string `json:"id"`
	Crn              string `json:"crn"`
	CreatedAt        string `json:"created_at"`
	CreatedByID      string `json:"created_by_id"`
	LastModifiedAt   string `json:"last_modified_at"`
	LastModifiedByID string `json:"last_modified_by_id"`
}

type RoleQuery

type RoleQuery struct {
	AccountID   string
	ServiceName string
	Format      RoleQueryFormatParameter
}

func (RoleQuery) SetQuery

func (q RoleQuery) SetQuery(req *rest.Request)

SetQuery will set query parameter to the passed-in request

type RoleQueryFormatParameter

type RoleQueryFormatParameter string

type RoleRepository

type RoleRepository interface {
	Get(roleID string) (Role, string, error)
	Create(request CreateRoleRequest) (Role, error)
	Update(request UpdateRoleRequest, roleID, etag string) (Role, error)
	Delete(roleID string) error
	ListCustomRoles(accountID, serviceName string) ([]Role, error)
	ListSystemDefinedRoles() ([]Role, error)
	ListServiceRoles(serviceName string) ([]Role, error)
	ListAll(query RoleQuery) ([]Role, error)
}

func NewRoleRepository

func NewRoleRepository(c *client.Client) RoleRepository

type UpdateRoleRequest

type UpdateRoleRequest struct {
	DisplayName string   `json:"display_name"`
	Description string   `json:"description"`
	Actions     []string `json:"actions,omitempty"`
}

Jump to

Keyboard shortcuts

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