Ejemplo n.º 1
0
 internal static async Task <bool> DeleteContainerApp(CommandLineArgs cmdLine)
 {
     if (await ArmHelper.DeleteResource(cmdLine.ContainerAppArgs.SubscriptionId, cmdLine.ContainerAppArgs.ResourceGroup, $"sbm{cmdLine.JobName}"))
     {
         log.LogInformation($"Successfully deleted ContainerApp: sbm{cmdLine.JobName}");
         return(true);
     }
     else
     {
         log.LogError($"Unable to delete ContainerApp: sbm{cmdLine.JobName}");
         return(false);
     }
 }
Ejemplo n.º 2
0
        internal static async Task <bool> DeleteAciInstance(string subscriptionId, string resourceGroupName, string aciName)
        {
            try
            {
                log.LogInformation("Removing any pre-existing ACI deployment");
                var success = await ArmHelper.DeleteResource(subscriptionId, resourceGroupName, aciName);

                log.LogInformation("Pre-existing ACI deployment removed");
                return(success);
            }
            catch (Exception exe)
            {
                log.LogError($"Unable to remove existing ACI instance: {exe.Message}");
                return(false);
            }
        }