Partager via


PSAzureContext Class

Definition

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

PSAzureContext()

Default constructor

PSAzureContext(IAzureContext)

Copy Constructor

PSAzureContext(PSObject)

Convert a context from a PSObject

Properties

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

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

DeepCopy(IAzureContext)
Update(IAzureContext, IAzureContext)
CopyPropertiesFrom(IExtensibleModel, IExtensibleModel)
GetProperty(IExtensibleModel, String)
GetPropertyAsArray(IExtensibleModel, String)
IsPropertySet(IExtensibleModel, String)
SetOrAppendProperty(IExtensibleModel, String, String[])
SetProperty(IExtensibleModel, String, String[])
UpdateProperties(IExtensibleModel, IExtensibleModel)
CopyFrom(IAzureContext, IAzureContext)
WithAccount(IAzureContext, IAzureAccount)
WithSubscription(IAzureContext, IAzureSubscription)
WithTenant(IAzureContext, IAzureTenant)
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.

PopulateExtensions(IExtensibleModel, PSObject)

Populate the model extensions from a PSObject

GetCurrentStorageAccountName(IAzureContext)
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.

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.

GetCurrentStorageAccountConnectionString(IAzureContext)
SetCurrentStorageAccount(IAzureContext, IStorageContext)
SetCurrentStorageAccount(IAzureContext, IStorageContextProvider)
SetCurrentStorageAccount(IAzureContext, String)

Applies to