Esempio n. 1
0
        /// <summary>
        /// Sets the activation date of the secret.
        /// ISO 8601 format, example: '2021-04-08T13:00:00.00+01:00'
        /// </summary>
        /// <param name="builder"></param>
        /// <param name="dateTime">The date and time, in ISO 8601 format, that the secret will activate.</param>
        /// <returns></returns>
        public static SecretBuilder ActivationDate(this SecretBuilder builder, Input <string> dateTime)
        {
            string dt      = dateTime.Apply(e => e).GetValueAsync().Result;
            var    seconds = ISO8601toTotalSeconds(dt);

            builder.SecretAttributes.NotBefore = seconds;
            return(builder);
        }
Esempio n. 2
0
 /// <summary>
 /// Property to toggle the accessibility of the Secret.
 /// </summary>
 /// <param name="builder"></param>
 /// <param name="isEnabled">Set to true to enable the secret; set to false to disable the secret.</param>
 /// <returns></returns>
 public static SecretBuilder IsEnabled(this SecretBuilder builder, Input <bool> isEnabled)
 {
     builder.SecretAttributes.Enabled = isEnabled;
     return(builder);
 }
Esempio n. 3
0
 /// <summary>
 /// Property to store a note of the type of content that the Secret holds.
 /// </summary>
 /// <param name="builder"></param>
 /// <param name="contentType">Note to indicate the type of content within the Secret.</param>
 /// <returns></returns>
 public static SecretBuilder ContentType(this SecretBuilder builder, Input <string> contentType)
 {
     builder.Properties.ContentType = contentType;
     return(builder);
 }
Esempio n. 4
0
 /// <summary>
 /// Sets the value of the Secret (i.e., password, code, etc).
 /// </summary>
 /// <param name="builder"></param>
 /// <param name="value">Value of the Secret</param>
 /// <returns></returns>
 public static SecretBuilder Value(this SecretBuilder builder, Input <string> value)
 {
     builder.Properties.Value = value;
     return(builder);
 }
Esempio n. 5
0
 /// <summary>
 /// Name of the Secret
 /// </summary>
 /// <param name="builder"></param>
 /// <param name="name">Name of the Secret</param>
 /// <returns></returns>
 public static SecretBuilder Name(this SecretBuilder builder, Input <string> name)
 {
     builder.Arguments.SecretName = name;
     return(builder);
 }
Esempio n. 6
0
 /// <summary>
 /// Sets the Secret tags
 /// </summary>
 /// <param name="builder">Secret builder</param>
 /// <param name="tags">Secret tags</param>
 /// <returns></returns>
 public static SecretBuilder Tags(this SecretBuilder builder, InputMap <string> tags)
 {
     builder.Arguments.Tags = tags;
     return(builder);
 }
Esempio n. 7
0
 /// <summary>
 /// Assigns the Secret to a resource group
 /// </summary>
 /// <param name="builder">Secret builder</param>
 /// <param name="resourceGroup">Resource group name</param>
 /// <returns></returns>
 public static SecretBuilder ResourceGroup(this SecretBuilder builder, Input <string> resourceGroup)
 {
     builder.Arguments.ResourceGroupName = resourceGroup;
     return(builder);
 }
Esempio n. 8
0
 /// <summary>
 /// Sets the activation date of the secret
 /// </summary>
 /// <param name="builder"></param>
 /// <param name="seconds">Activation date in seconds since 1970.</param>
 /// <returns></returns>
 public static SecretBuilder ActivationDate(this SecretBuilder builder, Input <int> seconds)
 {
     builder.SecretAttributes.NotBefore = seconds;
     return(builder);
 }
Esempio n. 9
0
 /// <summary>
 /// Sets the expiry date of the secret
 /// </summary>
 /// <param name="builder"></param>
 /// <param name="seconds">Expiry date in seconds since 1970.</param>
 /// <returns></returns>
 public static SecretBuilder ExpiryDate(this SecretBuilder builder, Input <int> seconds)
 {
     builder.SecretAttributes.Expires = seconds;
     return(builder);
 }