azure

package
v0.0.0-...-7c19135 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2021 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrApplicationAlreadyExists is the error when an application already exists
	ErrApplicationAlreadyExists = errors.New("application already exists")
	// ErrServicePrincipalAlreadyExists is the error when a azure service principal already exists
	ErrServicePrincipalAlreadyExists = errors.New("service principal already exists")
)

Functions

This section is empty.

Types

type ApplicationConfig

type ApplicationConfig struct {
	AppID                   *string
	AvailableToOtherTenants bool
	DisplayName             string
	HomePage                string
	IdentifierUris          []string
}

ApplicationConfig is the configuration for an azure application

type Client

type Client struct {
	Config
}

Client is the client for the azure users client

func New

func New(conf Config) *Client

New will return a new azure identities client

func (*Client) CreateADApplication

func (c *Client) CreateADApplication(ctx context.Context, appConfig ApplicationConfig) (graphrbac.Application, error)

CreateADApplication creates an Azure Active Directory (AAD) application

func (*Client) CreateApplicationCredentials

func (c *Client) CreateApplicationCredentials(ctx context.Context, appConfig ApplicationConfig) (password string, err error)

CreateApplicationCredentials will create/update an existing application's credentials

func (*Client) CreateServicePrincipal

func (c *Client) CreateServicePrincipal(ctx context.Context, appConfig ApplicationConfig) (graphrbac.ServicePrincipal, error)

CreateServicePrincipal creates a service principal associated with the specified application.

func (*Client) ListRoleDefinitions

func (c *Client) ListRoleDefinitions(ctx context.Context, rg, vnet string) ([]authorization.RoleDefinition, error)

ListRoleDefinitions will list azure role definitions for a given resource group, and virtual network

type Config

type Config struct {
	azure_auth.AuthConfig
}

Config is the configuration for the azure users client

Jump to

Keyboard shortcuts

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