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

com.pulumi.azure.storage.outputs.AccountCustomerManagedKey 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.storage.outputs;

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

@CustomType
public final class AccountCustomerManagedKey {
    /**
     * @return The ID of the Key Vault Key, supplying a version-less key ID will enable auto-rotation of this key. Exactly one of `key_vault_key_id` and `managed_hsm_key_id` may be specified.
     * 
     */
    private @Nullable String keyVaultKeyId;
    /**
     * @return The ID of the managed HSM Key. Exactly one of `key_vault_key_id` and `managed_hsm_key_id` may be specified.
     * 
     */
    private @Nullable String managedHsmKeyId;
    /**
     * @return The ID of a user assigned identity.
     * 
     * > **Note:** `customer_managed_key` can only be set when the `account_kind` is set to `StorageV2` or `account_tier` set to `Premium`, and the identity type is `UserAssigned`.
     * 
     */
    private String userAssignedIdentityId;

    private AccountCustomerManagedKey() {}
    /**
     * @return The ID of the Key Vault Key, supplying a version-less key ID will enable auto-rotation of this key. Exactly one of `key_vault_key_id` and `managed_hsm_key_id` may be specified.
     * 
     */
    public Optional keyVaultKeyId() {
        return Optional.ofNullable(this.keyVaultKeyId);
    }
    /**
     * @return The ID of the managed HSM Key. Exactly one of `key_vault_key_id` and `managed_hsm_key_id` may be specified.
     * 
     */
    public Optional managedHsmKeyId() {
        return Optional.ofNullable(this.managedHsmKeyId);
    }
    /**
     * @return The ID of a user assigned identity.
     * 
     * > **Note:** `customer_managed_key` can only be set when the `account_kind` is set to `StorageV2` or `account_tier` set to `Premium`, and the identity type is `UserAssigned`.
     * 
     */
    public String userAssignedIdentityId() {
        return this.userAssignedIdentityId;
    }

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

    public static Builder builder(AccountCustomerManagedKey defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable String keyVaultKeyId;
        private @Nullable String managedHsmKeyId;
        private String userAssignedIdentityId;
        public Builder() {}
        public Builder(AccountCustomerManagedKey defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.keyVaultKeyId = defaults.keyVaultKeyId;
    	      this.managedHsmKeyId = defaults.managedHsmKeyId;
    	      this.userAssignedIdentityId = defaults.userAssignedIdentityId;
        }

        @CustomType.Setter
        public Builder keyVaultKeyId(@Nullable String keyVaultKeyId) {

            this.keyVaultKeyId = keyVaultKeyId;
            return this;
        }
        @CustomType.Setter
        public Builder managedHsmKeyId(@Nullable String managedHsmKeyId) {

            this.managedHsmKeyId = managedHsmKeyId;
            return this;
        }
        @CustomType.Setter
        public Builder userAssignedIdentityId(String userAssignedIdentityId) {
            if (userAssignedIdentityId == null) {
              throw new MissingRequiredPropertyException("AccountCustomerManagedKey", "userAssignedIdentityId");
            }
            this.userAssignedIdentityId = userAssignedIdentityId;
            return this;
        }
        public AccountCustomerManagedKey build() {
            final var _resultValue = new AccountCustomerManagedKey();
            _resultValue.keyVaultKeyId = keyVaultKeyId;
            _resultValue.managedHsmKeyId = managedHsmKeyId;
            _resultValue.userAssignedIdentityId = userAssignedIdentityId;
            return _resultValue;
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy