graph

package
v0.0.1-alpha.9 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2025 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AssignmentApproval

type AssignmentApproval struct {
	ID     string                   `json:"id"`
	Stages AssignmentApprovalStages `json:"stages"`
}

type AssignmentApprovalStage

type AssignmentApprovalStage struct {
	ID            string `json:"id"`
	AssignedToMe  bool   `json:"assignedToMe"`
	ReviewResult  string `json:"reviewResult"`
	Status        string `json:"status"`
	Justification string `json:"justification"`
	ReviewedBy    struct {
		DisplayName       string `json:"displayName"`
		ID                string `json:"id"`
		Mail              string `json:"mail"`
		UserPrincipalName string `json:"userPrincipalName"`
	} `json:"reviewedBy"`
	ReviewedDateTime time.Time `json:"reviewedDateTime"`
}

type AssignmentApprovalStages

type AssignmentApprovalStages []AssignmentApprovalStage

type Client

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

func NewClient

func NewClient(cred azcore.TokenCredential, scopes []string) (*Client, error)

func (*Client) Me

func (c *Client) Me(ctx context.Context) (User, error)

func (*Client) PIMEntraRoleActiveAssignments

func (c *Client) PIMEntraRoleActiveAssignments(ctx context.Context) (EntraRoleActiveAssignments, error)

func (*Client) PIMEntraRoleApprovalRequests

func (c *Client) PIMEntraRoleApprovalRequests(ctx context.Context) (EntraRoleAssignmentRequests, error)

func (*Client) PIMEntraRoleAssignmentApprovalByApprovalID

func (c *Client) PIMEntraRoleAssignmentApprovalByApprovalID(ctx context.Context, approvalID string, justification string, reviewResult ReviewResult) error

func (*Client) PIMEntraRoleAssignmentRequests

func (c *Client) PIMEntraRoleAssignmentRequests(ctx context.Context) (EntraRoleAssignmentRequests, error)

func (*Client) PIMEntraRoleAssignmentScheduleRequest

func (c *Client) PIMEntraRoleAssignmentScheduleRequest(ctx context.Context, principalID string, entraRoleID string, justification string, startDateTime time.Time, durationHours string, entraRoleScopeID string) (string, error)

func (*Client) PIMEntraRoleEligibleAssignments

func (c *Client) PIMEntraRoleEligibleAssignments(ctx context.Context) (EntraRoleEligibleAssignments, error)

func (*Client) PIMEntraRoleGetMaximumExpirationByRoleID

func (c *Client) PIMEntraRoleGetMaximumExpirationByRoleID(ctx context.Context, entraRoleID string, entraRoleScopeID string) (string, error)

func (*Client) PIMGroupActiveAssignments

func (c *Client) PIMGroupActiveAssignments(ctx context.Context) (GroupActiveAssignments, error)

func (*Client) PIMGroupApprovalRequests

func (c *Client) PIMGroupApprovalRequests(ctx context.Context) (GroupAssignmentRequests, error)

func (*Client) PIMGroupAssignmentApprovalByApprovalID

func (c *Client) PIMGroupAssignmentApprovalByApprovalID(ctx context.Context, approvalID string, justification string, reviewResult ReviewResult) error

func (*Client) PIMGroupAssignmentRequests

func (c *Client) PIMGroupAssignmentRequests(ctx context.Context) (GroupAssignmentRequests, error)

func (*Client) PIMGroupAssignmentScheduleRequest

func (c *Client) PIMGroupAssignmentScheduleRequest(ctx context.Context, principalID string, groupID string, justification string, startDateTime time.Time, durationHours string) (string, error)

func (*Client) PIMGroupEligibleAssignments

func (c *Client) PIMGroupEligibleAssignments(ctx context.Context) (GroupEligibleAssignments, error)

func (*Client) PIMGroupGetMaximumExpirationByGroupID

func (c *Client) PIMGroupGetMaximumExpirationByGroupID(ctx context.Context, groupID string) (string, error)

type EntraRoleActiveAssignment

type EntraRoleActiveAssignment struct {
	ID                       string         `json:"id"`
	AssignmentType           string         `json:"assignmentType"`
	DirectoryScopeID         string         `json:"directoryScopeId"`
	MemberType               string         `json:"memberType"`
	PrincipalID              string         `json:"principalId"`
	RoleDefinitionID         string         `json:"roleDefinitionId"`
	RoleAssignmentOriginID   string         `json:"roleAssignmentOriginId"`
	RoleAssignmentScheduleID string         `json:"roleAssignmentScheduleId"`
	Principal                User           `json:"principal"`
	RoleDefinition           RoleDefinition `json:"roleDefinition"`
	StartDateTime            time.Time      `json:"startDateTime"`
	EndDateTime              time.Time      `json:"endDateTime"`
}

func (EntraRoleActiveAssignment) EndTime

func (g EntraRoleActiveAssignment) EndTime() string

func (EntraRoleActiveAssignment) Scope

type EntraRoleActiveAssignments

type EntraRoleActiveAssignments []EntraRoleActiveAssignment

type EntraRoleAssignmentRequest

type EntraRoleAssignmentRequest struct {
	ID                string    `json:"id"`
	Action            string    `json:"action"`
	ApprovalID        string    `json:"approvalId"`
	CompletedDateTime time.Time `json:"completedDateTime"`
	CreatedBy         struct {
		User struct {
			ID string `json:"id"`
		} `json:"user"`
	} `json:"createdBy"`
	CreatedDateTime  time.Time      `json:"createdDateTime"`
	DirectoryScopeID string         `json:"directoryScopeId"`
	IsValidationOnly bool           `json:"isValidationOnly"`
	Justification    string         `json:"justification"`
	Principal        User           `json:"principal"`
	PrincipalID      string         `json:"principalId"`
	RoleDefinition   RoleDefinition `json:"roleDefinition"`
	RoleDefinitionID string         `json:"roleDefinitionId"`
	ScheduleInfo     ScheduleInfo   `json:"scheduleInfo"`
	Status           string         `json:"status"`
	TargetScheduleID string         `json:"targetScheduleId"`
	TicketInfo       struct {
		TicketNumber string `json:"ticketNumber"`
		TicketSystem string `json:"ticketSystem"`
	} `json:"ticketInfo"`
}

func (EntraRoleAssignmentRequest) RequestTime

func (g EntraRoleAssignmentRequest) RequestTime() string

func (EntraRoleAssignmentRequest) Scope

type EntraRoleAssignmentRequests

type EntraRoleAssignmentRequests []EntraRoleAssignmentRequest

type EntraRoleEligibleAssignment

type EntraRoleEligibleAssignment struct {
	ID               string         `json:"id"`
	DirectoryScopeID string         `json:"directoryScopeId"`
	MemberType       string         `json:"memberType"`
	PrincipalID      string         `json:"principalId"`
	RoleDefinitionID string         `json:"roleDefinitionId"`
	Status           string         `json:"status"`
	ScheduleInfo     ScheduleInfo   `json:"scheduleInfo"`
	Principal        User           `json:"principal"`
	RoleDefinition   RoleDefinition `json:"roleDefinition"`
}

func (EntraRoleEligibleAssignment) Scope

type EntraRoleEligibleAssignments

type EntraRoleEligibleAssignments []EntraRoleEligibleAssignment

type Group

type Group struct {
	ID              string   `json:"id"`
	DisplayName     string   `json:"displayName"`
	Description     string   `json:"description"`
	SecurityEnabled bool     `json:"securityEnabled"`
	GroupTypes      []string `json:"groupTypes"`
}

func (Group) GroupType

func (g Group) GroupType() string

type GroupActiveAssignment

type GroupActiveAssignment struct {
	ID                   string    `json:"id"`
	AcessID              string    `json:"accessId"`
	AssignmentScheduleId string    `json:"assignmentScheduleId"`
	AssignmentType       string    `json:"assignmentType"`
	EndDateTime          time.Time `json:"endDateTime"`
	GroupID              string    `json:"groupId"`
	PricipalID           string    `json:"principalId"`
	MemberType           string    `json:"memberType"`
	StartDateTime        time.Time `json:"startDateTime"`
	Group                Group     `json:"group"`
	Principal            User      `json:"principal"`
}

func (GroupActiveAssignment) EndTime

func (g GroupActiveAssignment) EndTime() string

type GroupActiveAssignments

type GroupActiveAssignments []GroupActiveAssignment

type GroupAssignmentRequest

type GroupAssignmentRequest struct {
	ID                string    `json:"id"`
	AccessID          string    `json:"accessId"`
	Action            string    `json:"action"`
	ApprovalID        string    `json:"approvalId"`
	CompletedDateTime time.Time `json:"completedDateTime"`
	CreatedBy         struct {
		User struct {
			ID string `json:"id"`
		} `json:"user"`
	} `json:"createdBy"`
	CreatedDateTime  time.Time    `json:"createdDateTime"`
	Group            Group        `json:"group"`
	GroupID          string       `json:"groupId"`
	IsValidationOnly bool         `json:"isValidationOnly"`
	Justification    string       `json:"justification"`
	Principal        User         `json:"principal"`
	PrincipalID      string       `json:"principalId"`
	ScheduleInfo     ScheduleInfo `json:"scheduleInfo"`
	Status           string       `json:"status"`
	TargetSchduleID  string       `json:"targetScheduleId"`
	TicketInfo       struct {
		TicketNumber string `json:"ticketNumber"`
		TicketSystem string `json:"ticketSystem"`
	} `json:"ticketInfo"`
}

func (GroupAssignmentRequest) RequestTime

func (g GroupAssignmentRequest) RequestTime() string

type GroupAssignmentRequests

type GroupAssignmentRequests []GroupAssignmentRequest

type GroupEligibleAssignment

type GroupEligibleAssignment struct {
	ID           string       `json:"id"`
	GroupID      string       `json:"groupId"`
	PricipalID   string       `json:"principalId"`
	MemberType   string       `json:"memberType"`
	AccessID     string       `json:"accessId"`
	Status       string       `json:"status"`
	ScheduleInfo ScheduleInfo `json:"scheduleInfo"`
	Group        Group        `json:"group"`
	Principal    User         `json:"principal"`
}

type GroupEligibleAssignments

type GroupEligibleAssignments []GroupEligibleAssignment

type ReviewResult

type ReviewResult int
const (
	UnknownReviewResult ReviewResult = iota
	ApproveReviewResult
	DenyReviewResult
)

func (*ReviewResult) CobraCompletion

func (r *ReviewResult) CobraCompletion(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

func (*ReviewResult) HelpText

func (r *ReviewResult) HelpText() string

func (*ReviewResult) Set

func (r *ReviewResult) Set(v string) error

func (*ReviewResult) String

func (r *ReviewResult) String() string

func (*ReviewResult) Type

func (r *ReviewResult) Type() string

type RoleAssignmentApproval

type RoleAssignmentApproval struct {
	ID    string                      `json:"id"`
	Steps RoleAssignmentApprovalSteps `json:"steps"`
}

type RoleAssignmentApprovalStep

type RoleAssignmentApprovalStep struct {
	ID            string `json:"id"`
	AssignedToMe  bool   `json:"assignedToMe"`
	ReviewResult  string `json:"reviewResult"`
	Status        string `json:"status"`
	Justification string `json:"justification"`
	ReviewedBy    struct {
		DisplayName       string `json:"displayName"`
		ID                string `json:"id"`
		Mail              string `json:"mail"`
		UserPrincipalName string `json:"userPrincipalName"`
	} `json:"reviewedBy"`
	ReviewedDateTime time.Time `json:"reviewedDateTime"`
}

type RoleAssignmentApprovalSteps

type RoleAssignmentApprovalSteps []RoleAssignmentApprovalStep

type RoleDefinition

type RoleDefinition struct {
	Description string `json:"description"`
	DisplayName string `json:"displayName"`
	ID          string `json:"id"`
	IsBuiltIn   bool   `json:"isBuiltIn"`
	IsEnabled   bool   `json:"isEnabled"`
}

type ScheduleInfo

type ScheduleInfo struct {
	Expiration struct {
		Duration    string    `json:"duration"`
		Type        string    `json:"type"`
		EndDateTime time.Time `json:"endDateTime"`
	} `json:"expiration"`
	StartDateTime time.Time `json:"startDateTime"`
}

func (ScheduleInfo) EndTime

func (s ScheduleInfo) EndTime() string

func (ScheduleInfo) StartTime

func (s ScheduleInfo) StartTime() string

type UnifiedRoleManagementPolicyExpirationRule

type UnifiedRoleManagementPolicyExpirationRule struct {
	ID                   string `json:"id"`
	IsExpirationRequired bool   `json:"isExpirationRequired"`
	MaximumDuration      string `json:"maximumDuration"`
}

type User

type User struct {
	ID                string `json:"id"`
	DisplayName       string `json:"displayName"`
	GivenName         string `json:"givenName"`
	Surname           string `json:"surname"`
	Mail              string `json:"mail"`
	UserPrincipalName string `json:"userPrincipalName"`
}

Jump to

Keyboard shortcuts

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