/// <summary> /// Creates or updates a Template Spec version. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. The name is case insensitive. /// </param> /// <param name='templateSpecName'> /// Name of the Template Spec. /// </param> /// <param name='templateSpecVersion'> /// The version of the Template Spec. /// </param> /// <param name='templateSpecVersionModel'> /// Template Spec Version supplied to the operation. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <TemplateSpecVersion> CreateOrUpdateAsync(this ITemplateSpecVersionsOperations operations, string resourceGroupName, string templateSpecName, string templateSpecVersion, TemplateSpecVersion templateSpecVersionModel, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, templateSpecName, templateSpecVersion, templateSpecVersionModel, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Lists all the Template Spec versions in the specified Template Spec. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='nextPageLink'> /// The NextLink from the previous successful call to List operation. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <TemplateSpecVersion> > ListNextAsync(this ITemplateSpecVersionsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Lists all the Template Spec versions in the specified Template Spec. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. The name is case insensitive. /// </param> /// <param name='templateSpecName'> /// Name of the Template Spec. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <TemplateSpecVersion> > ListAsync(this ITemplateSpecVersionsOperations operations, string resourceGroupName, string templateSpecName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, templateSpecName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Initializes client properties. /// </summary> private void Initialize() { TemplateSpecs = new TemplateSpecsOperations(this); TemplateSpecVersions = new TemplateSpecVersionsOperations(this); BaseUri = new System.Uri("https://management.azure.com"); ApiVersion = "2019-06-01-preview"; AcceptLanguage = "en-US"; LongRunningOperationRetryTimeout = 30; GenerateClientRequestId = true; SerializationSettings = new JsonSerializerSettings { Formatting = Newtonsoft.Json.Formatting.Indented, DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, ContractResolver = new ReadOnlyJsonContractResolver(), Converters = new List <JsonConverter> { new Iso8601TimeSpanConverter() } }; SerializationSettings.Converters.Add(new TransformationJsonConverter()); DeserializationSettings = new JsonSerializerSettings { DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, ContractResolver = new ReadOnlyJsonContractResolver(), Converters = new List <JsonConverter> { new Iso8601TimeSpanConverter() } }; SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter <TemplateSpecArtifact>("kind")); DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter <TemplateSpecArtifact>("kind")); CustomInitialize(); DeserializationSettings.Converters.Add(new TransformationJsonConverter()); DeserializationSettings.Converters.Add(new CloudErrorJsonConverter()); }
/// <summary> /// Updates Template Spec Version tags with specified values. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. The name is case insensitive. /// </param> /// <param name='templateSpecName'> /// Name of the Template Spec. /// </param> /// <param name='templateSpecVersion'> /// The version of the Template Spec. /// </param> /// <param name='templateSpecVersionUpdateModel'> /// Template Spec Version resource with the tags to be updated. /// </param> public static TemplateSpecVersion Update(this ITemplateSpecVersionsOperations operations, string resourceGroupName, string templateSpecName, string templateSpecVersion, TemplateSpecVersionUpdateModel templateSpecVersionUpdateModel = default(TemplateSpecVersionUpdateModel)) { return(operations.UpdateAsync(resourceGroupName, templateSpecName, templateSpecVersion, templateSpecVersionUpdateModel).GetAwaiter().GetResult()); }
/// <summary> /// Creates or updates a Template Spec version. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. The name is case insensitive. /// </param> /// <param name='templateSpecName'> /// Name of the Template Spec. /// </param> /// <param name='templateSpecVersion'> /// The version of the Template Spec. /// </param> /// <param name='templateSpecVersionModel'> /// Template Spec Version supplied to the operation. /// </param> public static TemplateSpecVersion CreateOrUpdate(this ITemplateSpecVersionsOperations operations, string resourceGroupName, string templateSpecName, string templateSpecVersion, TemplateSpecVersion templateSpecVersionModel) { return(operations.CreateOrUpdateAsync(resourceGroupName, templateSpecName, templateSpecVersion, templateSpecVersionModel).GetAwaiter().GetResult()); }
/// <summary> /// Lists all the Template Spec versions in the specified Template Spec. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='nextPageLink'> /// The NextLink from the previous successful call to List operation. /// </param> public static IPage <TemplateSpecVersion> ListNext(this ITemplateSpecVersionsOperations operations, string nextPageLink) { return(operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult()); }
/// <summary> /// Lists all the Template Spec versions in the specified Template Spec. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. The name is case insensitive. /// </param> /// <param name='templateSpecName'> /// Name of the Template Spec. /// </param> public static IPage <TemplateSpecVersion> List(this ITemplateSpecVersionsOperations operations, string resourceGroupName, string templateSpecName) { return(operations.ListAsync(resourceGroupName, templateSpecName).GetAwaiter().GetResult()); }
/// <summary> /// Deletes a specific version from a Template Spec. When operation completes, /// status code 200 returned without content. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. The name is case insensitive. /// </param> /// <param name='templateSpecName'> /// Name of the Template Spec. /// </param> /// <param name='templateSpecVersion'> /// The version of the Template Spec. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task DeleteAsync(this ITemplateSpecVersionsOperations operations, string resourceGroupName, string templateSpecName, string templateSpecVersion, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, templateSpecName, templateSpecVersion, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Deletes a specific version from a Template Spec. When operation completes, /// status code 200 returned without content. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. The name is case insensitive. /// </param> /// <param name='templateSpecName'> /// Name of the Template Spec. /// </param> /// <param name='templateSpecVersion'> /// The version of the Template Spec. /// </param> public static void Delete(this ITemplateSpecVersionsOperations operations, string resourceGroupName, string templateSpecName, string templateSpecVersion) { operations.DeleteAsync(resourceGroupName, templateSpecName, templateSpecVersion).GetAwaiter().GetResult(); }