All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.azure.keyvault.ManagedHardwareSecurityModuleKeyRotationPolicyArgs Maven / Gradle / Ivy

Go to download

A Pulumi package for creating and managing Microsoft Azure cloud resources, based on the Terraform azurerm provider. We recommend using the [Azure Native provider](https://github.com/pulumi/pulumi-azure-native) to provision Azure infrastructure. Azure Native provides complete coverage of Azure resources and same-day access to new resources and resource updates.

There is a newer version: 6.10.0-alpha.1731737215
Show newest version
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.azure.keyvault;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


public final class ManagedHardwareSecurityModuleKeyRotationPolicyArgs extends com.pulumi.resources.ResourceArgs {

    public static final ManagedHardwareSecurityModuleKeyRotationPolicyArgs Empty = new ManagedHardwareSecurityModuleKeyRotationPolicyArgs();

    /**
     * Specify the expiration duration on a newly rotated key as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). The minimum duration is `P28D`.
     * 
     */
    @Import(name="expireAfter", required=true)
    private Output expireAfter;

    /**
     * @return Specify the expiration duration on a newly rotated key as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). The minimum duration is `P28D`.
     * 
     */
    public Output expireAfter() {
        return this.expireAfter;
    }

    /**
     * The ID of the Managed HSM Key. Changing this forces a new Managed HSM Key rotation policy to be created.
     * 
     */
    @Import(name="managedHsmKeyId", required=true)
    private Output managedHsmKeyId;

    /**
     * @return The ID of the Managed HSM Key. Changing this forces a new Managed HSM Key rotation policy to be created.
     * 
     */
    public Output managedHsmKeyId() {
        return this.managedHsmKeyId;
    }

    /**
     * Rotate automatically at a duration after key creation as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). Exactly one of `time_after_creation` or `time_before_expiry` should be specified.
     * 
     */
    @Import(name="timeAfterCreation")
    private @Nullable Output timeAfterCreation;

    /**
     * @return Rotate automatically at a duration after key creation as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). Exactly one of `time_after_creation` or `time_before_expiry` should be specified.
     * 
     */
    public Optional> timeAfterCreation() {
        return Optional.ofNullable(this.timeAfterCreation);
    }

    /**
     * Rotate automatically at a duration before key expiry as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). Exactly one of `time_after_creation` or `time_before_expiry` should be specified.
     * 
     */
    @Import(name="timeBeforeExpiry")
    private @Nullable Output timeBeforeExpiry;

    /**
     * @return Rotate automatically at a duration before key expiry as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). Exactly one of `time_after_creation` or `time_before_expiry` should be specified.
     * 
     */
    public Optional> timeBeforeExpiry() {
        return Optional.ofNullable(this.timeBeforeExpiry);
    }

    private ManagedHardwareSecurityModuleKeyRotationPolicyArgs() {}

    private ManagedHardwareSecurityModuleKeyRotationPolicyArgs(ManagedHardwareSecurityModuleKeyRotationPolicyArgs $) {
        this.expireAfter = $.expireAfter;
        this.managedHsmKeyId = $.managedHsmKeyId;
        this.timeAfterCreation = $.timeAfterCreation;
        this.timeBeforeExpiry = $.timeBeforeExpiry;
    }

    public static Builder builder() {
        return new Builder();
    }
    public static Builder builder(ManagedHardwareSecurityModuleKeyRotationPolicyArgs defaults) {
        return new Builder(defaults);
    }

    public static final class Builder {
        private ManagedHardwareSecurityModuleKeyRotationPolicyArgs $;

        public Builder() {
            $ = new ManagedHardwareSecurityModuleKeyRotationPolicyArgs();
        }

        public Builder(ManagedHardwareSecurityModuleKeyRotationPolicyArgs defaults) {
            $ = new ManagedHardwareSecurityModuleKeyRotationPolicyArgs(Objects.requireNonNull(defaults));
        }

        /**
         * @param expireAfter Specify the expiration duration on a newly rotated key as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). The minimum duration is `P28D`.
         * 
         * @return builder
         * 
         */
        public Builder expireAfter(Output expireAfter) {
            $.expireAfter = expireAfter;
            return this;
        }

        /**
         * @param expireAfter Specify the expiration duration on a newly rotated key as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). The minimum duration is `P28D`.
         * 
         * @return builder
         * 
         */
        public Builder expireAfter(String expireAfter) {
            return expireAfter(Output.of(expireAfter));
        }

        /**
         * @param managedHsmKeyId The ID of the Managed HSM Key. Changing this forces a new Managed HSM Key rotation policy to be created.
         * 
         * @return builder
         * 
         */
        public Builder managedHsmKeyId(Output managedHsmKeyId) {
            $.managedHsmKeyId = managedHsmKeyId;
            return this;
        }

        /**
         * @param managedHsmKeyId The ID of the Managed HSM Key. Changing this forces a new Managed HSM Key rotation policy to be created.
         * 
         * @return builder
         * 
         */
        public Builder managedHsmKeyId(String managedHsmKeyId) {
            return managedHsmKeyId(Output.of(managedHsmKeyId));
        }

        /**
         * @param timeAfterCreation Rotate automatically at a duration after key creation as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). Exactly one of `time_after_creation` or `time_before_expiry` should be specified.
         * 
         * @return builder
         * 
         */
        public Builder timeAfterCreation(@Nullable Output timeAfterCreation) {
            $.timeAfterCreation = timeAfterCreation;
            return this;
        }

        /**
         * @param timeAfterCreation Rotate automatically at a duration after key creation as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). Exactly one of `time_after_creation` or `time_before_expiry` should be specified.
         * 
         * @return builder
         * 
         */
        public Builder timeAfterCreation(String timeAfterCreation) {
            return timeAfterCreation(Output.of(timeAfterCreation));
        }

        /**
         * @param timeBeforeExpiry Rotate automatically at a duration before key expiry as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). Exactly one of `time_after_creation` or `time_before_expiry` should be specified.
         * 
         * @return builder
         * 
         */
        public Builder timeBeforeExpiry(@Nullable Output timeBeforeExpiry) {
            $.timeBeforeExpiry = timeBeforeExpiry;
            return this;
        }

        /**
         * @param timeBeforeExpiry Rotate automatically at a duration before key expiry as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). Exactly one of `time_after_creation` or `time_before_expiry` should be specified.
         * 
         * @return builder
         * 
         */
        public Builder timeBeforeExpiry(String timeBeforeExpiry) {
            return timeBeforeExpiry(Output.of(timeBeforeExpiry));
        }

        public ManagedHardwareSecurityModuleKeyRotationPolicyArgs build() {
            if ($.expireAfter == null) {
                throw new MissingRequiredPropertyException("ManagedHardwareSecurityModuleKeyRotationPolicyArgs", "expireAfter");
            }
            if ($.managedHsmKeyId == null) {
                throw new MissingRequiredPropertyException("ManagedHardwareSecurityModuleKeyRotationPolicyArgs", "managedHsmKeyId");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy