Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

PSAzureContext Class

Definition

Namespace:
Microsoft.Azure.Commands.Profile.Models.Core
Assembly:
Microsoft.Azure.PowerShell.Authentication.ResourceManager.dll

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

The context for connecting cmdlets in the current session to Azure.

public class PSAzureContext : Microsoft.Azure.Commands.Common.Authentication.Abstractions.IAzureContext
type PSAzureContext = class
 interface IAzureContext
 interface IExtensibleModel
Public Class PSAzureContext
Implements IAzureContext
Inheritance
PSAzureContext
Implements

Constructors

Name Description
PSAzureContext()

Default constructor

PSAzureContext(IAzureContext)

Copy Constructor

PSAzureContext(PSObject)

Convert a context from a PSObject

Properties

Name Description
Account

The account used to connect to Azure.

Environment

The endpoint and connection metadata for the targeted instance of the Azure cloud.

ExtendedProperties
Name

The name of the context. The context may be selected by name

Subscription

The subscription targeted in Azure.

Tenant

The targeted tenant in Azure.

TokenCache
VersionProfile

Operators

Name Description
Implicit(AzureContext to PSAzureContext)

Convert between implementations of the current connection context for Azure.

Implicit(PSAzureContext to AzureContext)

Convert between implementations of the current connection context for Azure.

Extension Methods

Name Description
CopyFrom(IAzureContext, IAzureContext)
CopyPropertiesFrom(IExtensibleModel, IExtensibleModel)
DeepCopy(IAzureContext)
GetCloudStorageAccount(IAzureContext, IStorageServiceProvider)

Get a CloudStorageAccount client for the current storage service using the given storage service provider

GetCloudStorageAccount(IAzureContext, IStorageServiceProvider)

Get a CloudStorageAccount client for the current storage service using the given storage service provider

GetCurrentStorageAccount(IAzureContext, IStorageServiceProvider)

Get the current storage account.

GetCurrentStorageAccount(IAzureContext, IStorageServiceProvider)

Get the current storage account.

GetCurrentStorageAccountConnectionString(IAzureContext)
GetCurrentStorageAccountName(IAzureContext)
GetProperty(IExtensibleModel, String)
GetPropertyAsArray(IExtensibleModel, String)
IsPropertySet(IExtensibleModel, String)
PopulateExtensions(IExtensibleModel, PSObject)

Populate the model extensions from a PSObject

SetCurrentStorageAccount(IAzureContext, IStorageContext)
SetCurrentStorageAccount(IAzureContext, IStorageContextProvider)
SetCurrentStorageAccount(IAzureContext, String)
SetOrAppendProperty(IExtensibleModel, String, String[])
SetProperty(IExtensibleModel, String, String[])
Update(IAzureContext, IAzureContext)
UpdateProperties(IExtensibleModel, IExtensibleModel)
WithAccount(IAzureContext, IAzureAccount)
WithSubscription(IAzureContext, IAzureSubscription)
WithTenant(IAzureContext, IAzureTenant)

Applies to