Beispiel #1
0
        protected async Task <FrontDoorSecretResource> CreateAfdSecret(ProfileResource profile, string secretName)
        {
            FrontDoorSecretData input = ResourceDataHelper.CreateAfdSecretData();
            var lro = await profile.GetFrontDoorSecrets().CreateOrUpdateAsync(WaitUntil.Completed, secretName, input);

            return(lro.Value);
        }
Beispiel #2
0
        internal static SecretListResult DeserializeSecretListResult(JsonElement element)
        {
            Optional <IReadOnlyList <FrontDoorSecretData> > value = default;
            Optional <string> nextLink = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("value"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    List <FrontDoorSecretData> array = new List <FrontDoorSecretData>();
                    foreach (var item in property.Value.EnumerateArray())
                    {
                        array.Add(FrontDoorSecretData.DeserializeFrontDoorSecretData(item));
                    }
                    value = array;
                    continue;
                }
                if (property.NameEquals("nextLink"))
                {
                    nextLink = property.Value.GetString();
                    continue;
                }
            }
            return(new SecretListResult(Optional.ToList(value), nextLink.Value));
        }