Documentation
¶
Index ¶
Constants ¶
View Source
const ( // Clouds. AzureChina = "AzureChina" AzureGovernment = "AzureGovernment" AzurePublic = "AzurePublic" // Audiences. IngestionChinaAudience = "https://monitor.azure.cn//.default" IngestionGovernmentAudience = "https://monitor.azure.us//.default" IngestionPublicAudience = "https://monitor.azure.com//.default" )
Variables ¶
This section is empty.
Functions ¶
func NewAzureADRoundTripper ¶
func NewAzureADRoundTripper(cfg *AzureADConfig, next http.RoundTripper) (http.RoundTripper, error)
NewAzureADRoundTripper creates round tripper adding Azure AD authorization to calls.
Types ¶
type AzureADConfig ¶
type AzureADConfig struct {
// ManagedIdentity is the managed identity that is being used to authenticate.
ManagedIdentity *ManagedIdentityConfig `yaml:"managed_identity,omitempty"`
// OAuth is the oauth config that is being used to authenticate.
OAuth *OAuthConfig `yaml:"oauth,omitempty"`
// Cloud is the Azure cloud in which the service is running. Example: AzurePublic/AzureGovernment/AzureChina.
Cloud string `yaml:"cloud,omitempty"`
}
AzureADConfig is used to store the config values.
func (*AzureADConfig) UnmarshalYAML ¶
func (c *AzureADConfig) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML unmarshal the Azure AD config yaml.
func (*AzureADConfig) Validate ¶
func (c *AzureADConfig) Validate() error
Validate validates config values provided.
type ManagedIdentityConfig ¶
type ManagedIdentityConfig struct {
// ClientID is the clientId of the managed identity that is being used to authenticate.
ClientID string `yaml:"client_id,omitempty"`
}
ManagedIdentityConfig is used to store managed identity config values.
type OAuthConfig ¶
type OAuthConfig struct {
// ClientID is the clientId of the azure active directory application that is being used to authenticate.
ClientID string `yaml:"client_id,omitempty"`
// ClientSecret is the clientSecret of the azure active directory application that is being used to authenticate.
ClientSecret string `yaml:"client_secret,omitempty"`
// TenantID is the tenantId of the azure active directory application that is being used to authenticate.
TenantID string `yaml:"tenant_id,omitempty"`
}
OAuthConfig is used to store azure oauth config values.
Click to show internal directories.
Click to hide internal directories.