///GENMHASH:DFC2593B74D1E01275625E2EE80CC9AD:D22668247339DCCC31D9166C946C6AA8 public ContainerGroupImpl WithNewAzureFileShareVolume(string volumeName, string shareName) { if (this.newFileShares == null || this.creatableStorageAccountKey == null) { Storage.Fluent.StorageAccount.Definition.IWithGroup definitionWithGroup = this.storageManager .StorageAccounts .Define(SdkContext.RandomResourceName("fs", 24)) .WithRegion(this.RegionName); Storage.Fluent.StorageAccount.Definition.IWithCreate creatable; if (this.newGroup != null) { creatable = definitionWithGroup.WithNewResourceGroup(this.newGroup); } else { creatable = definitionWithGroup.WithExistingResourceGroup(this.ResourceGroupName); } this.creatableStorageAccountKey = creatable.Key; this.AddCreatableDependency(creatable as IResourceCreator <IHasId>); this.newFileShares = new Dictionary <string, string>(); } this.newFileShares.Add(volumeName, shareName); return(this); }
public RegistryImpl WithNewStorageAccount(string storageAccountName) { Storage.Fluent.StorageAccount.Definition.IWithGroup definitionWithGroup = this.storageManager .StorageAccounts .Define(storageAccountName) .WithRegion(this.RegionName); Storage.Fluent.StorageAccount.Definition.IWithCreate definitionAfterGroup; if (this.newGroup != null) { definitionAfterGroup = definitionWithGroup.WithNewResourceGroup(this.newGroup); } else { definitionAfterGroup = definitionWithGroup.WithExistingResourceGroup(this.ResourceGroupName); } return(WithNewStorageAccount(definitionAfterGroup)); }
public FunctionAppImpl WithNewStorageAccount(string name, Storage.Fluent.Models.SkuName sku) { Storage.Fluent.StorageAccount.Definition.IWithGroup storageDefine = Manager.StorageManager.StorageAccounts .Define(name) .WithRegion(RegionName); if (newGroup != null && IsInCreateMode) { storageAccountCreatable = storageDefine.WithNewResourceGroup(newGroup) .WithGeneralPurposeAccountKind() .WithSku(sku); } else { storageAccountCreatable = storageDefine.WithExistingResourceGroup(ResourceGroupName) .WithGeneralPurposeAccountKind() .WithSku(sku); } AddCreatableDependency(storageAccountCreatable as IResourceCreator <IHasId>); return(this); }