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

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

// *** 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.azure.Utilities;
import com.pulumi.azure.keyvault.ManagedHardwareSecurityModuleKeyArgs;
import com.pulumi.azure.keyvault.inputs.ManagedHardwareSecurityModuleKeyState;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * Manages a Key Vault Managed Hardware Security Module Key.
 * 
 * > **Note:** The Azure Provider includes a Feature Toggle which will purge a Key Vault Managed Hardware Security Module Key resource on destroy, rather than the default soft-delete. See `purge_soft_deleted_hardware_security_modules_on_destroy` for more information.
 * 
 * <!--Start PulumiCodeChooser -->
 * <!--End PulumiCodeChooser -->
 * 
 * ## Import
 * 
 * Key Vault Managed Hardware Security Module Key can be imported using the `resource id`, e.g.
 * 
 * ```sh
 * $ pulumi import azure:keyvault/managedHardwareSecurityModuleKey:ManagedHardwareSecurityModuleKey example https://exampleHSM.managedhsm.azure.net/keys/exampleKey
 * ```
 * 
 */
@ResourceType(type="azure:keyvault/managedHardwareSecurityModuleKey:ManagedHardwareSecurityModuleKey")
public class ManagedHardwareSecurityModuleKey extends com.pulumi.resources.CustomResource {
    /**
     * Specifies the curve to use when creating an `EC-HSM` key. Possible values are `P-256`, `P-256K`, `P-384`, and `P-521`. This field is required if `key_type` is `EC-HSM`. Changing this forces a new resource to be created.
     * 
     */
    @Export(name="curve", refs={String.class}, tree="[0]")
    private Output curve;

    /**
     * @return Specifies the curve to use when creating an `EC-HSM` key. Possible values are `P-256`, `P-256K`, `P-384`, and `P-521`. This field is required if `key_type` is `EC-HSM`. Changing this forces a new resource to be created.
     * 
     */
    public Output> curve() {
        return Codegen.optional(this.curve);
    }
    /**
     * Expiration UTC datetime (Y-m-d'T'H:M:S'Z'). When this parameter gets changed on reruns, if newer date is ahead of current date, an update is performed. If the newer date is before the current date, resource will be force created.
     * 
     */
    @Export(name="expirationDate", refs={String.class}, tree="[0]")
    private Output expirationDate;

    /**
     * @return Expiration UTC datetime (Y-m-d'T'H:M:S'Z'). When this parameter gets changed on reruns, if newer date is ahead of current date, an update is performed. If the newer date is before the current date, resource will be force created.
     * 
     */
    public Output> expirationDate() {
        return Codegen.optional(this.expirationDate);
    }
    /**
     * A list of JSON web key operations. Possible values include: `decrypt`, `encrypt`, `sign`, `unwrapKey`, `verify` and `wrapKey`. Please note these values are case-sensitive.
     * 
     */
    @Export(name="keyOpts", refs={List.class,String.class}, tree="[0,1]")
    private Output> keyOpts;

    /**
     * @return A list of JSON web key operations. Possible values include: `decrypt`, `encrypt`, `sign`, `unwrapKey`, `verify` and `wrapKey`. Please note these values are case-sensitive.
     * 
     */
    public Output> keyOpts() {
        return this.keyOpts;
    }
    /**
     * Specifies the Size of the RSA key to create in bytes. For example, 1024 or 2048. *Note*: This field is required if `key_type` is `RSA-HSM`. Changing this forces a new resource to be created.
     * 
     */
    @Export(name="keySize", refs={Integer.class}, tree="[0]")
    private Output keySize;

    /**
     * @return Specifies the Size of the RSA key to create in bytes. For example, 1024 or 2048. *Note*: This field is required if `key_type` is `RSA-HSM`. Changing this forces a new resource to be created.
     * 
     */
    public Output> keySize() {
        return Codegen.optional(this.keySize);
    }
    /**
     * Specifies the Key Type to use for this Key Vault Managed Hardware Security Module Key. Possible values are `EC-HSM` and `RSA-HSM`. Changing this forces a new resource to be created.
     * 
     */
    @Export(name="keyType", refs={String.class}, tree="[0]")
    private Output keyType;

    /**
     * @return Specifies the Key Type to use for this Key Vault Managed Hardware Security Module Key. Possible values are `EC-HSM` and `RSA-HSM`. Changing this forces a new resource to be created.
     * 
     */
    public Output keyType() {
        return this.keyType;
    }
    /**
     * Specifies the ID of the Key Vault Managed Hardware Security Module that they key will be owned by. Changing this forces a new resource to be created.
     * 
     */
    @Export(name="managedHsmId", refs={String.class}, tree="[0]")
    private Output managedHsmId;

    /**
     * @return Specifies the ID of the Key Vault Managed Hardware Security Module that they key will be owned by. Changing this forces a new resource to be created.
     * 
     */
    public Output managedHsmId() {
        return this.managedHsmId;
    }
    /**
     * Specifies the name of the Key Vault Managed Hardware Security Module Key. Changing this forces a new resource to be created.
     * 
     */
    @Export(name="name", refs={String.class}, tree="[0]")
    private Output name;

    /**
     * @return Specifies the name of the Key Vault Managed Hardware Security Module Key. Changing this forces a new resource to be created.
     * 
     */
    public Output name() {
        return this.name;
    }
    /**
     * Key not usable before the provided UTC datetime (Y-m-d'T'H:M:S'Z').
     * 
     * > **Note:** Once `expiration_date` is set, it's not possible to unset the key even if it is deleted & recreated as underlying Azure API uses the restore of the purged key.
     * 
     */
    @Export(name="notBeforeDate", refs={String.class}, tree="[0]")
    private Output notBeforeDate;

    /**
     * @return Key not usable before the provided UTC datetime (Y-m-d'T'H:M:S'Z').
     * 
     * > **Note:** Once `expiration_date` is set, it's not possible to unset the key even if it is deleted & recreated as underlying Azure API uses the restore of the purged key.
     * 
     */
    public Output> notBeforeDate() {
        return Codegen.optional(this.notBeforeDate);
    }
    /**
     * A mapping of tags to assign to the resource.
     * 
     */
    @Export(name="tags", refs={Map.class,String.class}, tree="[0,1,1]")
    private Output> tags;

    /**
     * @return A mapping of tags to assign to the resource.
     * 
     */
    public Output>> tags() {
        return Codegen.optional(this.tags);
    }
    /**
     * The versioned Key Vault Secret Managed Hardware Security Module Key ID.
     * 
     */
    @Export(name="versionedId", refs={String.class}, tree="[0]")
    private Output versionedId;

    /**
     * @return The versioned Key Vault Secret Managed Hardware Security Module Key ID.
     * 
     */
    public Output versionedId() {
        return this.versionedId;
    }

    /**
     *
     * @param name The _unique_ name of the resulting resource.
     */
    public ManagedHardwareSecurityModuleKey(java.lang.String name) {
        this(name, ManagedHardwareSecurityModuleKeyArgs.Empty);
    }
    /**
     *
     * @param name The _unique_ name of the resulting resource.
     * @param args The arguments to use to populate this resource's properties.
     */
    public ManagedHardwareSecurityModuleKey(java.lang.String name, ManagedHardwareSecurityModuleKeyArgs args) {
        this(name, args, null);
    }
    /**
     *
     * @param name The _unique_ name of the resulting resource.
     * @param args The arguments to use to populate this resource's properties.
     * @param options A bag of options that control this resource's behavior.
     */
    public ManagedHardwareSecurityModuleKey(java.lang.String name, ManagedHardwareSecurityModuleKeyArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        super("azure:keyvault/managedHardwareSecurityModuleKey:ManagedHardwareSecurityModuleKey", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
    }

    private ManagedHardwareSecurityModuleKey(java.lang.String name, Output id, @Nullable ManagedHardwareSecurityModuleKeyState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        super("azure:keyvault/managedHardwareSecurityModuleKey:ManagedHardwareSecurityModuleKey", name, state, makeResourceOptions(options, id), false);
    }

    private static ManagedHardwareSecurityModuleKeyArgs makeArgs(ManagedHardwareSecurityModuleKeyArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        if (options != null && options.getUrn().isPresent()) {
            return null;
        }
        return args == null ? ManagedHardwareSecurityModuleKeyArgs.Empty : args;
    }

    private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) {
        var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder()
            .version(Utilities.getVersion())
            .build();
        return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id);
    }

    /**
     * Get an existing Host resource's state with the given name, ID, and optional extra
     * properties used to qualify the lookup.
     *
     * @param name The _unique_ name of the resulting resource.
     * @param id The _unique_ provider ID of the resource to lookup.
     * @param state
     * @param options Optional settings to control the behavior of the CustomResource.
     */
    public static ManagedHardwareSecurityModuleKey get(java.lang.String name, Output id, @Nullable ManagedHardwareSecurityModuleKeyState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        return new ManagedHardwareSecurityModuleKey(name, id, state, options);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy