roleassignments

package
v1.17.2 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RoleAssignmentScope

type RoleAssignmentScope interface {
	azure.AsyncStatusUpdater
	azure.Authorizer
	RoleAssignmentSpecs(principalID *string) []azure.ResourceSpecGetter
	HasSystemAssignedIdentity() bool
	RoleAssignmentResourceType() string
	Name() string
	ResourceGroup() string
}

RoleAssignmentScope defines the scope interface for a role assignment service.

type RoleAssignmentSpec added in v1.3.0

type RoleAssignmentSpec struct {
	Name             string
	MachineName      string
	ResourceGroup    string
	ResourceType     string
	PrincipalID      *string
	PrincipalType    armauthorization.PrincipalType
	RoleDefinitionID string
	Scope            string
}

RoleAssignmentSpec defines the specification for a role assignment.

func (*RoleAssignmentSpec) OwnerResourceName added in v1.3.0

func (s *RoleAssignmentSpec) OwnerResourceName() string

OwnerResourceName returns the scope for role assignment. TODO: Consider renaming the function for better readability (@sonasingh46).

func (*RoleAssignmentSpec) Parameters added in v1.3.0

func (s *RoleAssignmentSpec) Parameters(ctx context.Context, existing interface{}) (interface{}, error)

Parameters returns the parameters for the RoleAssignmentSpec.

func (*RoleAssignmentSpec) ResourceGroupName added in v1.3.0

func (s *RoleAssignmentSpec) ResourceGroupName() string

ResourceGroupName returns the name of the resource group.

func (*RoleAssignmentSpec) ResourceName added in v1.3.0

func (s *RoleAssignmentSpec) ResourceName() string

ResourceName returns the name of the role assignment.

type Service

type Service struct {
	Scope RoleAssignmentScope

	async.Reconciler
	// contains filtered or unexported fields
}

Service provides operations on Azure resources.

func New

func New(scope RoleAssignmentScope) (*Service, error)

New creates a new service.

func (*Service) Delete

func (s *Service) Delete(ctx context.Context) error

Delete is a no-op as the role assignments get deleted as part of VM deletion.

func (*Service) IsManaged added in v1.3.0

func (s *Service) IsManaged(ctx context.Context) (bool, error)

IsManaged returns always returns true as CAPZ does not support BYO role assignments.

func (*Service) Name added in v1.3.0

func (s *Service) Name() string

Name returns the service name.

func (*Service) Reconcile

func (s *Service) Reconcile(ctx context.Context) error

Reconcile idempotently creates or updates a role assignment.

Directories

Path Synopsis
Package mock_roleassignments is a generated GoMock package.
Package mock_roleassignments is a generated GoMock package.

Jump to

Keyboard shortcuts

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