environments

package
v0.52.0 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MsGraphGlobal = Api{
		AppId:    PublishedApis["MicrosoftGraph"],
		Endpoint: MsGraphGlobalEndpoint,
	}

	MsGraphChina = Api{
		AppId:    PublishedApis["MicrosoftGraph"],
		Endpoint: MsGraphChinaEndpoint,
	}

	MsGraphUSGovL4 = Api{
		AppId:    PublishedApis["MicrosoftGraph"],
		Endpoint: MsGraphUSGovL4Endpoint,
	}

	MsGraphUSGovL5 = Api{
		AppId:    PublishedApis["MicrosoftGraph"],
		Endpoint: MsGraphUSGovL5Endpoint,
	}

	MsGraphCanary = Api{
		AppId:    PublishedApis["MicrosoftGraph"],
		Endpoint: MsGraphCanaryEndpoint,
	}

	AadGraphGlobal = Api{
		AppId:    PublishedApis["AzureActiveDirectoryGraph"],
		Endpoint: AadGraphGlobalEndpoint,
	}

	AadGraphChina = Api{
		AppId:    PublishedApis["AzureActiveDirectoryGraph"],
		Endpoint: AadGraphChinaEndpoint,
	}

	AadGraphUSGov = Api{
		AppId:    PublishedApis["AzureActiveDirectoryGraph"],
		Endpoint: AadGraphUSGovEndpoint,
	}

	ResourceManagerPublic = Api{
		AppId:    PublishedApis["AzureServiceManagement"],
		Endpoint: ResourceManagerPublicEndpoint,
	}

	ResourceManagerChina = Api{
		AppId:    PublishedApis["AzureServiceManagement"],
		Endpoint: ResourceManagerChinaEndpoint,
	}

	ResourceManagerUSGov = Api{
		AppId:    PublishedApis["AzureServiceManagement"],
		Endpoint: ResourceManagerUSGovEndpoint,
	}

	BatchManagementPublic = Api{
		AppId:    PublishedApis["AzureBatch"],
		Endpoint: BatchManagementPublicEndpoint,
	}

	BatchManagementChina = Api{
		AppId:    PublishedApis["AzureBatch"],
		Endpoint: BatchManagementChinaEndpoint,
	}

	BatchManagementUSGov = Api{
		AppId:    PublishedApis["AzureBatch"],
		Endpoint: BatchManagementUSGovEndpoint,
	}

	DataLakePublic = Api{
		AppId:    PublishedApis["AzureDataLake"],
		Endpoint: DataLakePublicEndpoint,
	}

	KeyVaultPublic = Api{
		AppId:    PublishedApis["AzureKeyVault"],
		Endpoint: KeyVaultPublicEndpoint,
	}

	KeyVaultChina = Api{
		AppId:    PublishedApis["AzureKeyVault"],
		Endpoint: KeyVaultChinaEndpoint,
	}

	KeyVaultUSGov = Api{
		AppId:    PublishedApis["AzureKeyVault"],
		Endpoint: KeyVaultUSGovEndpoint,
	}

	OperationalInsightsPublic = Api{
		AppId:    PublishedApis["LogAnalytics"],
		Endpoint: OperationalInsightsPublicEndpoint,
	}

	OperationalInsightsUSGov = Api{
		AppId:    PublishedApis["LogAnalytics"],
		Endpoint: OperationalInsightsUSGovEndpoint,
	}

	OSSRDBMSPublic = Api{
		AppId:    PublishedApis["OssRdbms"],
		Endpoint: OSSRDBMSPublicEndpoint,
	}

	OSSRDBMSChina = Api{
		AppId:    PublishedApis["OssRdbms"],
		Endpoint: OSSRDBMSChinaEndpoint,
	}

	OSSRDBMSUSGov = Api{
		AppId:    PublishedApis["OssRdbms"],
		Endpoint: OSSRDBMSUSGovEndpoint,
	}

	ServiceBusPublic = Api{
		AppId:    PublishedApis["AzureServiceBus"],
		Endpoint: ServiceBusPublicEndpoint,
	}

	ServiceBusChina = Api{
		AppId:    PublishedApis["AzureServiceBus"],
		Endpoint: ServiceBusChinaEndpoint,
	}

	ServiceBusUSGov = Api{
		AppId:    PublishedApis["AzureServiceBus"],
		Endpoint: ServiceBusUSGovEndpoint,
	}

	ServiceManagementPublic = Api{
		AppId:    PublishedApis["AzureServiceManagement"],
		Endpoint: ServiceManagementPublicEndpoint,
	}

	ServiceManagementChina = Api{
		AppId:    PublishedApis["AzureServiceManagement"],
		Endpoint: ServiceManagementChinaEndpoint,
	}

	ServiceManagementUSGov = Api{
		AppId:    PublishedApis["AzureServiceManagement"],
		Endpoint: ServiceManagementUSGovEndpoint,
	}

	SQLDatabasePublic = Api{
		AppId:    PublishedApis["AzureSqlDatabase"],
		Endpoint: SQLDatabasePublicEndpoint,
	}

	SQLDatabaseChina = Api{
		AppId:    PublishedApis["AzureSqlDatabase"],
		Endpoint: SQLDatabaseChinaEndpoint,
	}

	SQLDatabaseUSGov = Api{
		AppId:    PublishedApis["AzureSqlDatabase"],
		Endpoint: SQLDatabaseUSGovEndpoint,
	}

	StoragePublic = Api{
		AppId:    PublishedApis["AzureStorage"],
		Endpoint: StoragePublicEndpoint,
	}

	SynapsePublic = Api{
		AppId:    PublishedApis["AzureSynapseGateway"],
		Endpoint: SynapsePublicEndpoint,
	}

	SynapseUSGov = Api{
		AppId:    PublishedApis["AzureSynapseGateway"],
		Endpoint: SynapseUSGovEndpoint,
	}
)
View Source
var (
	Global = Environment{
		AzureADEndpoint:     AzureADGlobal,
		MsGraph:             MsGraphGlobal,
		AadGraph:            AadGraphGlobal,
		ResourceManager:     ResourceManagerPublic,
		BatchManagement:     BatchManagementPublic,
		DataLake:            DataLakePublic,
		KeyVault:            KeyVaultPublic,
		OperationalInsights: OperationalInsightsPublic,
		OSSRDBMS:            OSSRDBMSPublic,
		ServiceBus:          ServiceBusPublic,
		ServiceManagement:   ServiceManagementPublic,
		SQLDatabase:         SQLDatabasePublic,
		Storage:             StoragePublic,
		Synapse:             SynapsePublic,
	}

	China = Environment{
		AzureADEndpoint:     AzureADChina,
		MsGraph:             MsGraphChina,
		AadGraph:            AadGraphChina,
		ResourceManager:     ResourceManagerChina,
		BatchManagement:     BatchManagementChina,
		KeyVault:            KeyVaultChina,
		OperationalInsights: ApiUnavailable,
		OSSRDBMS:            OSSRDBMSChina,
		ServiceBus:          ServiceBusChina,
		ServiceManagement:   ServiceManagementChina,
		SQLDatabase:         SQLDatabaseChina,
		Storage:             StoragePublic,
		Synapse:             SynapsePublic,
	}

	USGovernmentL4 = Environment{
		AzureADEndpoint:     AzureADUSGov,
		MsGraph:             MsGraphUSGovL4,
		AadGraph:            AadGraphUSGov,
		ResourceManager:     ResourceManagerUSGov,
		BatchManagement:     BatchManagementUSGov,
		DataLake:            ApiUnavailable,
		KeyVault:            KeyVaultUSGov,
		OperationalInsights: OperationalInsightsUSGov,
		OSSRDBMS:            OSSRDBMSUSGov,
		ServiceBus:          ServiceBusUSGov,
		ServiceManagement:   ServiceManagementUSGov,
		SQLDatabase:         SQLDatabaseUSGov,
		Storage:             StoragePublic,
		Synapse:             SynapseUSGov,
	}

	USGovernmentL5 = Environment{
		AzureADEndpoint:     AzureADUSGov,
		MsGraph:             MsGraphUSGovL5,
		AadGraph:            AadGraphUSGov,
		ResourceManager:     ResourceManagerUSGov,
		BatchManagement:     BatchManagementUSGov,
		DataLake:            ApiUnavailable,
		KeyVault:            KeyVaultUSGov,
		OperationalInsights: OperationalInsightsUSGov,
		OSSRDBMS:            OSSRDBMSUSGov,
		ServiceBus:          ServiceBusUSGov,
		ServiceManagement:   ServiceManagementUSGov,
		SQLDatabase:         SQLDatabaseUSGov,
		Storage:             StoragePublic,
		Synapse:             SynapseUSGov,
	}

	Canary = Environment{
		AzureADEndpoint: AzureADGlobal,
		MsGraph:         MsGraphCanary,
	}
)
View Source
var ApiUnavailable = Api{}
View Source
var PublishedApis = map[string]ApiAppId{}/* 104 elements not displayed */

PublishedApis is a map containing Application IDs for well known APIs published by Microsoft. They can be used to acquire access tokens, but are primarily described here for easy inclusion in application manifests and service principal assignments.

Functions

This section is empty.

Types

type Api added in v0.5.0

type Api struct {
	// The Application ID for the API.
	AppId ApiAppId

	// The endpoint for the API, including scheme.
	Endpoint ApiEndpoint
}

API represent an API configuration for Microsoft Graph or Azure Active Directory Graph.

func (Api) DefaultScope added in v0.35.0

func (a Api) DefaultScope() string

func (Api) IsAvailable added in v0.37.0

func (a Api) IsAvailable() bool

func (Api) Resource added in v0.35.0

func (a Api) Resource() string

type ApiAppId added in v0.5.0

type ApiAppId = string

type ApiCliName added in v0.5.0

type ApiCliName string
const (
	MsGraphCliName         ApiCliName = "ms-graph"
	AadGraphCliName        ApiCliName = "aad-graph"
	ResourceManagerCliName ApiCliName = "arm"
	BatchCliName           ApiCliName = "batch"
	DataLakeCliName        ApiCliName = "data-lake"
	OSSRDBMSCliName        ApiCliName = "oss-rdbms"
)

type ApiEndpoint added in v0.5.0

type ApiEndpoint string
const (
	MsGraphGlobalEndpoint  ApiEndpoint = "https://graph.microsoft.com"
	MsGraphChinaEndpoint   ApiEndpoint = "https://microsoftgraph.chinacloudapi.cn"
	MsGraphUSGovL4Endpoint ApiEndpoint = "https://graph.microsoft.us"
	MsGraphUSGovL5Endpoint ApiEndpoint = "https://dod-graph.microsoft.us"
	MsGraphCanaryEndpoint  ApiEndpoint = "https://canary.graph.microsoft.com"

	AadGraphGlobalEndpoint ApiEndpoint = "https://graph.windows.net"
	AadGraphChinaEndpoint  ApiEndpoint = "https://graph.chinacloudapi.cn"
	AadGraphUSGovEndpoint  ApiEndpoint = "https://graph.microsoftazure.us"

	ResourceManagerPublicEndpoint ApiEndpoint = "https://management.azure.com"
	ResourceManagerChinaEndpoint  ApiEndpoint = "https://management.chinacloudapi.cn"
	ResourceManagerUSGovEndpoint  ApiEndpoint = "https://management.usgovcloudapi.net"

	BatchManagementPublicEndpoint ApiEndpoint = "https://batch.core.windows.net"
	BatchManagementChinaEndpoint  ApiEndpoint = "https://batch.chinacloudapi.cn"
	BatchManagementUSGovEndpoint  ApiEndpoint = "https://batch.core.usgovcloudapi.net"

	DataLakePublicEndpoint ApiEndpoint = "https://datalake.azure.net"

	KeyVaultPublicEndpoint ApiEndpoint = "https://vault.azure.net"
	KeyVaultChinaEndpoint  ApiEndpoint = "https://vault.azure.cn"
	KeyVaultUSGovEndpoint  ApiEndpoint = "https://vault.usgovcloudapi.net"

	OperationalInsightsPublicEndpoint ApiEndpoint = "https://api.loganalytics.io"
	OperationalInsightsUSGovEndpoint  ApiEndpoint = "https://api.loganalytics.us"

	OSSRDBMSPublicEndpoint ApiEndpoint = "https://ossrdbms-aad.database.windows.net"
	OSSRDBMSChinaEndpoint  ApiEndpoint = "https://ossrdbms-aad.database.chinacloudapi.cn"
	OSSRDBMSUSGovEndpoint  ApiEndpoint = "https://ossrdbms-aad.database.usgovcloudapi.net"

	ServiceBusPublicEndpoint ApiEndpoint = "https://servicebus.windows.net"
	ServiceBusChinaEndpoint  ApiEndpoint = "https://servicebus.chinacloudapi.cn"
	ServiceBusUSGovEndpoint  ApiEndpoint = "https://servicebus.usgovcloudapi.net"

	ServiceManagementPublicEndpoint ApiEndpoint = "https://management.core.windows.net"
	ServiceManagementChinaEndpoint  ApiEndpoint = "https://management.core.chinacloudapi.cn"
	ServiceManagementUSGovEndpoint  ApiEndpoint = "https://management.core.usgovcloudapi.net"

	SQLDatabasePublicEndpoint ApiEndpoint = "https://database.windows.net"
	SQLDatabaseChinaEndpoint  ApiEndpoint = "https://database.chinacloudapi.cn"
	SQLDatabaseUSGovEndpoint  ApiEndpoint = "https://database.usgovcloudapi.net"

	StoragePublicEndpoint ApiEndpoint = "https://storage.azure.com"

	SynapsePublicEndpoint ApiEndpoint = "https://dev.azuresynapse.net"
	SynapseUSGovEndpoint  ApiEndpoint = "https://dev.azuresynapse.usgovcloudapi.net"
)

type AzureADEndpoint

type AzureADEndpoint string
const (
	AzureADGlobal AzureADEndpoint = "https://login.microsoftonline.com"
	AzureADUSGov  AzureADEndpoint = "https://login.microsoftonline.us"
	AzureADChina  AzureADEndpoint = "https://login.chinacloudapi.cn"
)

type Environment

type Environment struct {
	// The Azure AD endpoint for acquiring access tokens.
	AzureADEndpoint AzureADEndpoint

	// Management plane API definitions
	MsGraph             Api
	AadGraph            Api
	ResourceManager     Api
	BatchManagement     Api
	DataLake            Api
	KeyVault            Api
	OperationalInsights Api
	OSSRDBMS            Api
	ServiceBus          Api
	ServiceManagement   Api
	SQLDatabase         Api
	Storage             Api
	Synapse             Api
}

Environment represents a set of API configurations for a particular cloud.

func EnvironmentFromString added in v0.34.0

func EnvironmentFromString(env string) (Environment, error)

Jump to

Keyboard shortcuts

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