Documentation ¶
Index ¶
- Constants
- Variables
- func IsNotFound(err error) bool
- func ToString(s *string) string
- func ToStringPtr(s string) *string
- func ToUUIDString(u *uuid.UUID) string
- type Client
- type Config
- func (c *Config) GetAuthorizer() (autorest.Authorizer, error)
- func (c *Config) GetClientCertificate() (*auth.ClientCertificateConfig, error)
- func (c *Config) GetClientCredentials() (*auth.ClientCredentialsConfig, error)
- func (c *Config) GetDeviceFlow() *auth.DeviceFlowConfig
- func (c *Config) GetEnvironment() (azure.Environment, error)
- func (c *Config) GetMSI() *auth.MSIConfig
- func (c *Config) GetUsernamePassword() (*auth.UsernamePasswordConfig, error)
- type Option
Constants ¶
const (
// UserAgent is the user agent addition that identifies the Azure client
UserAgent = "identity-manager-azure-client"
)
Variables ¶
var DefaultConfigMap = map[string]string{ "environment": azure.PublicCloud.Name, "activeDirectoryEndpointUrl": azure.PublicCloud.ActiveDirectoryEndpoint, "resourceManagerEndpointUrl": azure.PublicCloud.ResourceManagerEndpoint, "activeDirectoryGraphResourceId": azure.PublicCloud.ActiveDirectoryEndpoint, "galleryEndpointUrl": azure.PublicCloud.GalleryEndpoint, "managementEndpointUrl": azure.PublicCloud.ServiceManagementEndpoint, }
DefaultConfigMap is the config map with default settings
Functions ¶
func IsNotFound ¶
IsNotFound returns a value indicating whether the given error represents that the resource was not found.
func ToUUIDString ¶
ToUUIDString expects uuid and returns string
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is the definition of the Client object
func (*Client) GetAuthorizer ¶
func (x *Client) GetAuthorizer() autorest.Authorizer
GetAuthorizer returns client's authorizer
type Config ¶
type Config struct { // AzureEnv Environment string `json:"environment" yaml:"environment"` // IDs TenantID string `json:"tenantId" yaml:"tenantId"` SubscriptionID string `json:"subscriptionId" yaml:"subscriptionId"` // Auth1 ClientID string `json:"clientId" yaml:"clientId"` ClientSecret string `json:"clientSecret" yaml:"clientSecret"` // Auth2 Username string `json:"username" yaml:"username"` Password string `json:"password" yaml:"password"` // Auth3 Certificate string `json:"certificate" yaml:"certificate"` CertificatePath string `json:"certificatePath" yaml:"certificatePath"` CertificatePassword string `json:"certificatePassword" yaml:"certificatePassword"` // Defaults ResourceGroup string `json:"resourceGroup" yaml:"resourceGroup"` Location string `json:"location" yaml:"location"` // ??? ADResource string `json:"adResource" yaml:"adResource"` // ??? UseManagedIdentityExtension bool `json:"useManagedIdentityExtension" yaml:"useManagedIdentityExtension"` UserAssignedIdentityID string `json:"userAssignedIdentityID" yaml:"userAssignedIdentityID"` UseDeviceFlow bool `json:"useDeviceFlow" yaml:"useDeviceFlow"` // URLs ActiveDirectoryEndpointURL string `json:"activeDirectoryEndpointUrl" yaml:"activeDirectoryEndpointUrl"` ResourceManagerEndpointURL string `json:"resourceManagerEndpointUrl" yaml:"resourceManagerEndpointUrl"` ActiveDirectoryGraphResourceID string `json:"activeDirectoryGraphResourceId" yaml:"activeDirectoryGraphResourceId"` SQLManagementEndpointURL string `json:"sqlManagementEndpointUrl,omitempty" yaml:"sqlManagementEndpointUrl,omitempty"` GalleryEndpointURL string `json:"galleryEndpointUrl,omitempty" yaml:"galleryEndpointUrl,omitempty"` ManagementEndpointURL string `json:"managementEndpointUrl,omitempty" yaml:"managementEndpointUrl,omitempty"` }
Config - simple aws session config
func (*Config) GetAuthorizer ¶
func (c *Config) GetAuthorizer() (autorest.Authorizer, error)
GetAuthorizer returns the autorest.Authorizer based on the available settings
func (*Config) GetClientCertificate ¶
func (c *Config) GetClientCertificate() (*auth.ClientCertificateConfig, error)
GetClientCertificate creates a config object from the available certificate credentials. An error is returned if no certificate credentials are available.
func (*Config) GetClientCredentials ¶
func (c *Config) GetClientCredentials() (*auth.ClientCredentialsConfig, error)
GetClientCredentials creates a config object from the available client credentials. An error is returned if no client credentials are available.
func (*Config) GetDeviceFlow ¶
func (c *Config) GetDeviceFlow() *auth.DeviceFlowConfig
GetDeviceFlow creates a device-flow config object from the available client and tenant IDs.
func (*Config) GetEnvironment ¶
func (c *Config) GetEnvironment() (azure.Environment, error)
GetEnvironment returns azure.Environment based on Config's Environment
func (*Config) GetUsernamePassword ¶
func (c *Config) GetUsernamePassword() (*auth.UsernamePasswordConfig, error)
GetUsernamePassword creates a config object from the available username/password credentials. An error is returned if no username/password credentials are available.
type Option ¶
Option is the function syntax definition that is used as a generic return type for config options
func WithConfigData ¶
WithConfigData expects data and returns Option with a populated map
func WithConfigMap ¶
WithConfigMap expects map[string]interface and returns Option
func WithConfigMapFunc ¶
WithConfigMapFunc executes fn and returns Option with fn's returned map value