Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

/** An enum to describe Azure Cloud. */
/**
* An enum to describe Azure Cloud environments.
* @enum {string}
*/
export enum AzureClouds {
/** Azure public cloud, which is the default cloud for Azure SDKs. */
AZURE_PUBLIC_CLOUD = "AZURE_PUBLIC_CLOUD",
Expand All @@ -14,6 +17,12 @@ export enum AzureClouds {
/** The supported values for cloud setting as a string literal type */
export type AzureSupportedClouds = `${AzureClouds}`;

/**
* Gets the Azure Resource Manager endpoint URL for the specified cloud setting.
* @param cloudSetting - The Azure cloud environment setting. Use one of the AzureClouds enum values.
* @returns The ARM endpoint URL for the specified cloud, or undefined if cloudSetting is undefined.
* @throws {Error} Throws an error if an unknown cloud setting is provided.
*/
export function getArmEndpoint(
cloudSetting?: AzureSupportedClouds,
): string | undefined {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
/** An enum to describe Azure Cloud. */
/**
* An enum to describe Azure Cloud environments.
* @enum {string}
*/
export enum AzureClouds {
/** Azure public cloud, which is the default cloud for Azure SDKs. */
AZURE_PUBLIC_CLOUD = "AZURE_PUBLIC_CLOUD",
Expand All @@ -11,6 +14,12 @@ export enum AzureClouds {
/** The supported values for cloud setting as a string literal type */
export type AzureSupportedClouds = `${AzureClouds}`;

/**
* Gets the Azure Resource Manager endpoint URL for the specified cloud setting.
* @param cloudSetting - The Azure cloud environment setting. Use one of the AzureClouds enum values.
* @returns The ARM endpoint URL for the specified cloud, or undefined if cloudSetting is undefined.
* @throws {Error} Throws an error if an unknown cloud setting is provided.
*/
export function getArmEndpoint(
cloudSetting?: AzureSupportedClouds
): string | undefined {
Expand Down
Loading