Esempio n. 1
0
        public async Task Purge()
        {
            SubscriptionResource subscription = await Client.GetDefaultSubscriptionAsync();

            ResourceGroupResource rg = await CreateResourceGroup(subscription, "testRg-");

            string          afdProfileName = Recording.GenerateAssetName("AFDProfile-");
            ProfileResource afdProfile     = await CreateAfdProfile(rg, afdProfileName, CdnSkuName.StandardAzureFrontDoor);

            string afdEndpointName = Recording.GenerateAssetName("AFDEndpoint-");
            FrontDoorEndpointResource afdEndpointInstance = await CreateAfdEndpoint(afdProfile, afdEndpointName);

            FrontDoorPurgeContent purgeParameters = new FrontDoorPurgeContent(new List <string>
            {
                "/*"
            });

            Assert.DoesNotThrowAsync(async() => await afdEndpointInstance.PurgeContentAsync(WaitUntil.Completed, purgeParameters));
        }