public PSStorageAccount(StorageModels.StorageAccount storageAccount)
 {
     this.ResourceGroupName  = new ResourceIdentifier(storageAccount.Id).ResourceGroupName;
     this.StorageAccountName = storageAccount.Name;
     this.Id                          = storageAccount.Id;
     this.Location                    = storageAccount.Location;
     this.Sku                         = new PSSku(storageAccount.Sku);
     this.Encryption                  = storageAccount.Encryption;
     this.Kind                        = storageAccount.Kind;
     this.AccessTier                  = storageAccount.AccessTier;
     this.CreationTime                = storageAccount.CreationTime;
     this.CustomDomain                = storageAccount.CustomDomain is null ? null : new PSCustomDomain(storageAccount.CustomDomain);
     this.Identity                    = storageAccount.Identity;
     this.LastGeoFailoverTime         = storageAccount.LastGeoFailoverTime;
     this.PrimaryEndpoints            = storageAccount.PrimaryEndpoints;
     this.PrimaryLocation             = storageAccount.PrimaryLocation;
     this.ProvisioningState           = storageAccount.ProvisioningState;
     this.SecondaryEndpoints          = storageAccount.SecondaryEndpoints;
     this.SecondaryLocation           = storageAccount.SecondaryLocation;
     this.StatusOfPrimary             = storageAccount.StatusOfPrimary;
     this.StatusOfSecondary           = storageAccount.StatusOfSecondary;
     this.Tags                        = storageAccount.Tags;
     this.EnableHttpsTrafficOnly      = storageAccount.EnableHttpsTrafficOnly;
     this.NetworkRuleSet              = PSNetworkRuleSet.ParsePSNetworkRule(storageAccount.NetworkRuleSet);
     this.EnableHierarchicalNamespace = storageAccount.IsHnsEnabled;
     this.FailoverInProgress          = storageAccount.FailoverInProgress;
     this.LargeFileSharesState        = storageAccount.LargeFileSharesState;
     this.AzureFilesIdentityBasedAuth = storageAccount.AzureFilesIdentityBasedAuthentication is null ? null : new PSAzureFilesIdentityBasedAuthentication(storageAccount.AzureFilesIdentityBasedAuthentication);
     this.GeoReplicationStats         = PSGeoReplicationStats.ParsePSGeoReplicationStats(storageAccount.GeoReplicationStats);
     this.AllowBlobPublicAccess       = storageAccount.AllowBlobPublicAccess;
     this.MinimumTlsVersion           = storageAccount.MinimumTlsVersion;
     this.BlobRestoreStatus           = storageAccount.BlobRestoreStatus is null ? null : new PSBlobRestoreStatus(storageAccount.BlobRestoreStatus);
 }
Example #2
0
 public PSStorageAccount(StorageModels.StorageAccount storageAccount)
 {
     this.ResourceGroupName  = new ResourceIdentifier(storageAccount.Id).ResourceGroupName;
     this.StorageAccountName = storageAccount.Name;
     this.Id                          = storageAccount.Id;
     this.Location                    = storageAccount.Location;
     this.Sku                         = storageAccount.Sku;
     this.Encryption                  = storageAccount.Encryption;
     this.Kind                        = storageAccount.Kind;
     this.AccessTier                  = storageAccount.AccessTier;
     this.CreationTime                = storageAccount.CreationTime;
     this.CustomDomain                = storageAccount.CustomDomain is null ? null : new PSCustomDomain(storageAccount.CustomDomain);
     this.Identity                    = storageAccount.Identity;
     this.LastGeoFailoverTime         = storageAccount.LastGeoFailoverTime;
     this.PrimaryEndpoints            = storageAccount.PrimaryEndpoints;
     this.PrimaryLocation             = storageAccount.PrimaryLocation;
     this.ProvisioningState           = storageAccount.ProvisioningState;
     this.SecondaryEndpoints          = storageAccount.SecondaryEndpoints;
     this.SecondaryLocation           = storageAccount.SecondaryLocation;
     this.StatusOfPrimary             = storageAccount.StatusOfPrimary;
     this.StatusOfSecondary           = storageAccount.StatusOfSecondary;
     this.Tags                        = storageAccount.Tags;
     this.EnableHttpsTrafficOnly      = storageAccount.EnableHttpsTrafficOnly;
     this.NetworkRuleSet              = PSNetworkRuleSet.ParsePSNetworkRule(storageAccount.NetworkRuleSet);
     this.EnableHierarchicalNamespace = storageAccount.IsHnsEnabled;
     this.AzureFilesIdentityBasedAuth = storageAccount.AzureFilesIdentityBasedAuthentication is null ? null : new PSAzureFilesIdentityBasedAuthentication(storageAccount.AzureFilesIdentityBasedAuthentication);
 }
Example #3
0
 public PSStorageAccount(StorageModels.StorageAccount storageAccount)
 {
     this.ResourceGroupName  = ParseResourceGroupFromId(storageAccount.Id);
     this.StorageAccountName = storageAccount.Name;
     this.Id                     = storageAccount.Id;
     this.Location               = storageAccount.Location;
     this.Sku                    = storageAccount.Sku;
     this.Encryption             = storageAccount.Encryption;
     this.Kind                   = storageAccount.Kind;
     this.AccessTier             = storageAccount.AccessTier;
     this.CreationTime           = storageAccount.CreationTime;
     this.CustomDomain           = storageAccount.CustomDomain;
     this.Identity               = storageAccount.Identity;
     this.LastGeoFailoverTime    = storageAccount.LastGeoFailoverTime;
     this.PrimaryEndpoints       = storageAccount.PrimaryEndpoints;
     this.PrimaryLocation        = storageAccount.PrimaryLocation;
     this.ProvisioningState      = storageAccount.ProvisioningState;
     this.SecondaryEndpoints     = storageAccount.SecondaryEndpoints;
     this.SecondaryLocation      = storageAccount.SecondaryLocation;
     this.StatusOfPrimary        = storageAccount.StatusOfPrimary;
     this.StatusOfSecondary      = storageAccount.StatusOfSecondary;
     this.Tags                   = storageAccount.Tags;
     this.EnableHttpsTrafficOnly = storageAccount.EnableHttpsTrafficOnly;
     this.NetworkRuleSet         = PSNetworkRuleSet.ParsePSNetworkRule(storageAccount.NetworkAcls);
 }