@cdktf/provider-databricks
Version:
Prebuilt databricks Provider for Terraform CDK (cdktf)
1,183 lines • 182 kB
JavaScript
"use strict";
var _a, _b, _c, _d, _e, _f, _g;
Object.defineProperty(exports, "__esModule", { value: true });
exports.DataDatabricksStorageCredential = exports.DataDatabricksStorageCredentialStorageCredentialInfoOutputReference = exports.DataDatabricksStorageCredentialStorageCredentialInfoDatabricksGcpServiceAccountOutputReference = exports.DataDatabricksStorageCredentialStorageCredentialInfoCloudflareApiTokenOutputReference = exports.DataDatabricksStorageCredentialStorageCredentialInfoAzureServicePrincipalOutputReference = exports.DataDatabricksStorageCredentialStorageCredentialInfoAzureManagedIdentityOutputReference = exports.DataDatabricksStorageCredentialStorageCredentialInfoAwsIamRoleOutputReference = void 0;
exports.dataDatabricksStorageCredentialStorageCredentialInfoAwsIamRoleToTerraform = dataDatabricksStorageCredentialStorageCredentialInfoAwsIamRoleToTerraform;
exports.dataDatabricksStorageCredentialStorageCredentialInfoAwsIamRoleToHclTerraform = dataDatabricksStorageCredentialStorageCredentialInfoAwsIamRoleToHclTerraform;
exports.dataDatabricksStorageCredentialStorageCredentialInfoAzureManagedIdentityToTerraform = dataDatabricksStorageCredentialStorageCredentialInfoAzureManagedIdentityToTerraform;
exports.dataDatabricksStorageCredentialStorageCredentialInfoAzureManagedIdentityToHclTerraform = dataDatabricksStorageCredentialStorageCredentialInfoAzureManagedIdentityToHclTerraform;
exports.dataDatabricksStorageCredentialStorageCredentialInfoAzureServicePrincipalToTerraform = dataDatabricksStorageCredentialStorageCredentialInfoAzureServicePrincipalToTerraform;
exports.dataDatabricksStorageCredentialStorageCredentialInfoAzureServicePrincipalToHclTerraform = dataDatabricksStorageCredentialStorageCredentialInfoAzureServicePrincipalToHclTerraform;
exports.dataDatabricksStorageCredentialStorageCredentialInfoCloudflareApiTokenToTerraform = dataDatabricksStorageCredentialStorageCredentialInfoCloudflareApiTokenToTerraform;
exports.dataDatabricksStorageCredentialStorageCredentialInfoCloudflareApiTokenToHclTerraform = dataDatabricksStorageCredentialStorageCredentialInfoCloudflareApiTokenToHclTerraform;
exports.dataDatabricksStorageCredentialStorageCredentialInfoDatabricksGcpServiceAccountToTerraform = dataDatabricksStorageCredentialStorageCredentialInfoDatabricksGcpServiceAccountToTerraform;
exports.dataDatabricksStorageCredentialStorageCredentialInfoDatabricksGcpServiceAccountToHclTerraform = dataDatabricksStorageCredentialStorageCredentialInfoDatabricksGcpServiceAccountToHclTerraform;
exports.dataDatabricksStorageCredentialStorageCredentialInfoToTerraform = dataDatabricksStorageCredentialStorageCredentialInfoToTerraform;
exports.dataDatabricksStorageCredentialStorageCredentialInfoToHclTerraform = dataDatabricksStorageCredentialStorageCredentialInfoToHclTerraform;
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
const cdktf = require("cdktf");
function dataDatabricksStorageCredentialStorageCredentialInfoAwsIamRoleToTerraform(struct) {
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
return struct;
}
if (cdktf.isComplexElement(struct)) {
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
}
return {
external_id: cdktf.stringToTerraform(struct.externalId),
role_arn: cdktf.stringToTerraform(struct.roleArn),
unity_catalog_iam_arn: cdktf.stringToTerraform(struct.unityCatalogIamArn),
};
}
function dataDatabricksStorageCredentialStorageCredentialInfoAwsIamRoleToHclTerraform(struct) {
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
return struct;
}
if (cdktf.isComplexElement(struct)) {
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
}
const attrs = {
external_id: {
value: cdktf.stringToHclTerraform(struct.externalId),
isBlock: false,
type: "simple",
storageClassType: "string",
},
role_arn: {
value: cdktf.stringToHclTerraform(struct.roleArn),
isBlock: false,
type: "simple",
storageClassType: "string",
},
unity_catalog_iam_arn: {
value: cdktf.stringToHclTerraform(struct.unityCatalogIamArn),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class DataDatabricksStorageCredentialStorageCredentialInfoAwsIamRoleOutputReference extends cdktf.ComplexObject {
/**
* @param terraformResource The parent resource
* @param terraformAttribute The attribute on the parent resource this class is referencing
*/
constructor(terraformResource, terraformAttribute) {
super(terraformResource, terraformAttribute, false, 0);
this.isEmptyObject = false;
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._externalId !== undefined) {
hasAnyValues = true;
internalValueResult.externalId = this._externalId;
}
if (this._roleArn !== undefined) {
hasAnyValues = true;
internalValueResult.roleArn = this._roleArn;
}
if (this._unityCatalogIamArn !== undefined) {
hasAnyValues = true;
internalValueResult.unityCatalogIamArn = this._unityCatalogIamArn;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._externalId = undefined;
this._roleArn = undefined;
this._unityCatalogIamArn = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._externalId = value.externalId;
this._roleArn = value.roleArn;
this._unityCatalogIamArn = value.unityCatalogIamArn;
}
}
get externalId() {
return this.getStringAttribute('external_id');
}
set externalId(value) {
this._externalId = value;
}
resetExternalId() {
this._externalId = undefined;
}
// Temporarily expose input value. Use with caution.
get externalIdInput() {
return this._externalId;
}
get roleArn() {
return this.getStringAttribute('role_arn');
}
set roleArn(value) {
this._roleArn = value;
}
// Temporarily expose input value. Use with caution.
get roleArnInput() {
return this._roleArn;
}
get unityCatalogIamArn() {
return this.getStringAttribute('unity_catalog_iam_arn');
}
set unityCatalogIamArn(value) {
this._unityCatalogIamArn = value;
}
resetUnityCatalogIamArn() {
this._unityCatalogIamArn = undefined;
}
// Temporarily expose input value. Use with caution.
get unityCatalogIamArnInput() {
return this._unityCatalogIamArn;
}
}
exports.DataDatabricksStorageCredentialStorageCredentialInfoAwsIamRoleOutputReference = DataDatabricksStorageCredentialStorageCredentialInfoAwsIamRoleOutputReference;
_a = JSII_RTTI_SYMBOL_1;
DataDatabricksStorageCredentialStorageCredentialInfoAwsIamRoleOutputReference[_a] = { fqn: "@cdktf/provider-databricks.dataDatabricksStorageCredential.DataDatabricksStorageCredentialStorageCredentialInfoAwsIamRoleOutputReference", version: "15.3.1" };
function dataDatabricksStorageCredentialStorageCredentialInfoAzureManagedIdentityToTerraform(struct) {
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
return struct;
}
if (cdktf.isComplexElement(struct)) {
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
}
return {
access_connector_id: cdktf.stringToTerraform(struct.accessConnectorId),
credential_id: cdktf.stringToTerraform(struct.credentialId),
managed_identity_id: cdktf.stringToTerraform(struct.managedIdentityId),
};
}
function dataDatabricksStorageCredentialStorageCredentialInfoAzureManagedIdentityToHclTerraform(struct) {
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
return struct;
}
if (cdktf.isComplexElement(struct)) {
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
}
const attrs = {
access_connector_id: {
value: cdktf.stringToHclTerraform(struct.accessConnectorId),
isBlock: false,
type: "simple",
storageClassType: "string",
},
credential_id: {
value: cdktf.stringToHclTerraform(struct.credentialId),
isBlock: false,
type: "simple",
storageClassType: "string",
},
managed_identity_id: {
value: cdktf.stringToHclTerraform(struct.managedIdentityId),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class DataDatabricksStorageCredentialStorageCredentialInfoAzureManagedIdentityOutputReference extends cdktf.ComplexObject {
/**
* @param terraformResource The parent resource
* @param terraformAttribute The attribute on the parent resource this class is referencing
*/
constructor(terraformResource, terraformAttribute) {
super(terraformResource, terraformAttribute, false, 0);
this.isEmptyObject = false;
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._accessConnectorId !== undefined) {
hasAnyValues = true;
internalValueResult.accessConnectorId = this._accessConnectorId;
}
if (this._credentialId !== undefined) {
hasAnyValues = true;
internalValueResult.credentialId = this._credentialId;
}
if (this._managedIdentityId !== undefined) {
hasAnyValues = true;
internalValueResult.managedIdentityId = this._managedIdentityId;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._accessConnectorId = undefined;
this._credentialId = undefined;
this._managedIdentityId = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._accessConnectorId = value.accessConnectorId;
this._credentialId = value.credentialId;
this._managedIdentityId = value.managedIdentityId;
}
}
get accessConnectorId() {
return this.getStringAttribute('access_connector_id');
}
set accessConnectorId(value) {
this._accessConnectorId = value;
}
// Temporarily expose input value. Use with caution.
get accessConnectorIdInput() {
return this._accessConnectorId;
}
get credentialId() {
return this.getStringAttribute('credential_id');
}
set credentialId(value) {
this._credentialId = value;
}
resetCredentialId() {
this._credentialId = undefined;
}
// Temporarily expose input value. Use with caution.
get credentialIdInput() {
return this._credentialId;
}
get managedIdentityId() {
return this.getStringAttribute('managed_identity_id');
}
set managedIdentityId(value) {
this._managedIdentityId = value;
}
resetManagedIdentityId() {
this._managedIdentityId = undefined;
}
// Temporarily expose input value. Use with caution.
get managedIdentityIdInput() {
return this._managedIdentityId;
}
}
exports.DataDatabricksStorageCredentialStorageCredentialInfoAzureManagedIdentityOutputReference = DataDatabricksStorageCredentialStorageCredentialInfoAzureManagedIdentityOutputReference;
_b = JSII_RTTI_SYMBOL_1;
DataDatabricksStorageCredentialStorageCredentialInfoAzureManagedIdentityOutputReference[_b] = { fqn: "@cdktf/provider-databricks.dataDatabricksStorageCredential.DataDatabricksStorageCredentialStorageCredentialInfoAzureManagedIdentityOutputReference", version: "15.3.1" };
function dataDatabricksStorageCredentialStorageCredentialInfoAzureServicePrincipalToTerraform(struct) {
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
return struct;
}
if (cdktf.isComplexElement(struct)) {
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
}
return {
application_id: cdktf.stringToTerraform(struct.applicationId),
client_secret: cdktf.stringToTerraform(struct.clientSecret),
directory_id: cdktf.stringToTerraform(struct.directoryId),
};
}
function dataDatabricksStorageCredentialStorageCredentialInfoAzureServicePrincipalToHclTerraform(struct) {
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
return struct;
}
if (cdktf.isComplexElement(struct)) {
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
}
const attrs = {
application_id: {
value: cdktf.stringToHclTerraform(struct.applicationId),
isBlock: false,
type: "simple",
storageClassType: "string",
},
client_secret: {
value: cdktf.stringToHclTerraform(struct.clientSecret),
isBlock: false,
type: "simple",
storageClassType: "string",
},
directory_id: {
value: cdktf.stringToHclTerraform(struct.directoryId),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class DataDatabricksStorageCredentialStorageCredentialInfoAzureServicePrincipalOutputReference extends cdktf.ComplexObject {
/**
* @param terraformResource The parent resource
* @param terraformAttribute The attribute on the parent resource this class is referencing
*/
constructor(terraformResource, terraformAttribute) {
super(terraformResource, terraformAttribute, false, 0);
this.isEmptyObject = false;
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._applicationId !== undefined) {
hasAnyValues = true;
internalValueResult.applicationId = this._applicationId;
}
if (this._clientSecret !== undefined) {
hasAnyValues = true;
internalValueResult.clientSecret = this._clientSecret;
}
if (this._directoryId !== undefined) {
hasAnyValues = true;
internalValueResult.directoryId = this._directoryId;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._applicationId = undefined;
this._clientSecret = undefined;
this._directoryId = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._applicationId = value.applicationId;
this._clientSecret = value.clientSecret;
this._directoryId = value.directoryId;
}
}
get applicationId() {
return this.getStringAttribute('application_id');
}
set applicationId(value) {
this._applicationId = value;
}
// Temporarily expose input value. Use with caution.
get applicationIdInput() {
return this._applicationId;
}
get clientSecret() {
return this.getStringAttribute('client_secret');
}
set clientSecret(value) {
this._clientSecret = value;
}
// Temporarily expose input value. Use with caution.
get clientSecretInput() {
return this._clientSecret;
}
get directoryId() {
return this.getStringAttribute('directory_id');
}
set directoryId(value) {
this._directoryId = value;
}
// Temporarily expose input value. Use with caution.
get directoryIdInput() {
return this._directoryId;
}
}
exports.DataDatabricksStorageCredentialStorageCredentialInfoAzureServicePrincipalOutputReference = DataDatabricksStorageCredentialStorageCredentialInfoAzureServicePrincipalOutputReference;
_c = JSII_RTTI_SYMBOL_1;
DataDatabricksStorageCredentialStorageCredentialInfoAzureServicePrincipalOutputReference[_c] = { fqn: "@cdktf/provider-databricks.dataDatabricksStorageCredential.DataDatabricksStorageCredentialStorageCredentialInfoAzureServicePrincipalOutputReference", version: "15.3.1" };
function dataDatabricksStorageCredentialStorageCredentialInfoCloudflareApiTokenToTerraform(struct) {
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
return struct;
}
if (cdktf.isComplexElement(struct)) {
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
}
return {
access_key_id: cdktf.stringToTerraform(struct.accessKeyId),
account_id: cdktf.stringToTerraform(struct.accountId),
secret_access_key: cdktf.stringToTerraform(struct.secretAccessKey),
};
}
function dataDatabricksStorageCredentialStorageCredentialInfoCloudflareApiTokenToHclTerraform(struct) {
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
return struct;
}
if (cdktf.isComplexElement(struct)) {
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
}
const attrs = {
access_key_id: {
value: cdktf.stringToHclTerraform(struct.accessKeyId),
isBlock: false,
type: "simple",
storageClassType: "string",
},
account_id: {
value: cdktf.stringToHclTerraform(struct.accountId),
isBlock: false,
type: "simple",
storageClassType: "string",
},
secret_access_key: {
value: cdktf.stringToHclTerraform(struct.secretAccessKey),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class DataDatabricksStorageCredentialStorageCredentialInfoCloudflareApiTokenOutputReference extends cdktf.ComplexObject {
/**
* @param terraformResource The parent resource
* @param terraformAttribute The attribute on the parent resource this class is referencing
*/
constructor(terraformResource, terraformAttribute) {
super(terraformResource, terraformAttribute, false, 0);
this.isEmptyObject = false;
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._accessKeyId !== undefined) {
hasAnyValues = true;
internalValueResult.accessKeyId = this._accessKeyId;
}
if (this._accountId !== undefined) {
hasAnyValues = true;
internalValueResult.accountId = this._accountId;
}
if (this._secretAccessKey !== undefined) {
hasAnyValues = true;
internalValueResult.secretAccessKey = this._secretAccessKey;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._accessKeyId = undefined;
this._accountId = undefined;
this._secretAccessKey = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._accessKeyId = value.accessKeyId;
this._accountId = value.accountId;
this._secretAccessKey = value.secretAccessKey;
}
}
get accessKeyId() {
return this.getStringAttribute('access_key_id');
}
set accessKeyId(value) {
this._accessKeyId = value;
}
// Temporarily expose input value. Use with caution.
get accessKeyIdInput() {
return this._accessKeyId;
}
get accountId() {
return this.getStringAttribute('account_id');
}
set accountId(value) {
this._accountId = value;
}
// Temporarily expose input value. Use with caution.
get accountIdInput() {
return this._accountId;
}
get secretAccessKey() {
return this.getStringAttribute('secret_access_key');
}
set secretAccessKey(value) {
this._secretAccessKey = value;
}
// Temporarily expose input value. Use with caution.
get secretAccessKeyInput() {
return this._secretAccessKey;
}
}
exports.DataDatabricksStorageCredentialStorageCredentialInfoCloudflareApiTokenOutputReference = DataDatabricksStorageCredentialStorageCredentialInfoCloudflareApiTokenOutputReference;
_d = JSII_RTTI_SYMBOL_1;
DataDatabricksStorageCredentialStorageCredentialInfoCloudflareApiTokenOutputReference[_d] = { fqn: "@cdktf/provider-databricks.dataDatabricksStorageCredential.DataDatabricksStorageCredentialStorageCredentialInfoCloudflareApiTokenOutputReference", version: "15.3.1" };
function dataDatabricksStorageCredentialStorageCredentialInfoDatabricksGcpServiceAccountToTerraform(struct) {
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
return struct;
}
if (cdktf.isComplexElement(struct)) {
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
}
return {
credential_id: cdktf.stringToTerraform(struct.credentialId),
email: cdktf.stringToTerraform(struct.email),
};
}
function dataDatabricksStorageCredentialStorageCredentialInfoDatabricksGcpServiceAccountToHclTerraform(struct) {
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
return struct;
}
if (cdktf.isComplexElement(struct)) {
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
}
const attrs = {
credential_id: {
value: cdktf.stringToHclTerraform(struct.credentialId),
isBlock: false,
type: "simple",
storageClassType: "string",
},
email: {
value: cdktf.stringToHclTerraform(struct.email),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class DataDatabricksStorageCredentialStorageCredentialInfoDatabricksGcpServiceAccountOutputReference extends cdktf.ComplexObject {
/**
* @param terraformResource The parent resource
* @param terraformAttribute The attribute on the parent resource this class is referencing
*/
constructor(terraformResource, terraformAttribute) {
super(terraformResource, terraformAttribute, false, 0);
this.isEmptyObject = false;
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._credentialId !== undefined) {
hasAnyValues = true;
internalValueResult.credentialId = this._credentialId;
}
if (this._email !== undefined) {
hasAnyValues = true;
internalValueResult.email = this._email;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._credentialId = undefined;
this._email = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._credentialId = value.credentialId;
this._email = value.email;
}
}
get credentialId() {
return this.getStringAttribute('credential_id');
}
set credentialId(value) {
this._credentialId = value;
}
resetCredentialId() {
this._credentialId = undefined;
}
// Temporarily expose input value. Use with caution.
get credentialIdInput() {
return this._credentialId;
}
get email() {
return this.getStringAttribute('email');
}
set email(value) {
this._email = value;
}
resetEmail() {
this._email = undefined;
}
// Temporarily expose input value. Use with caution.
get emailInput() {
return this._email;
}
}
exports.DataDatabricksStorageCredentialStorageCredentialInfoDatabricksGcpServiceAccountOutputReference = DataDatabricksStorageCredentialStorageCredentialInfoDatabricksGcpServiceAccountOutputReference;
_e = JSII_RTTI_SYMBOL_1;
DataDatabricksStorageCredentialStorageCredentialInfoDatabricksGcpServiceAccountOutputReference[_e] = { fqn: "@cdktf/provider-databricks.dataDatabricksStorageCredential.DataDatabricksStorageCredentialStorageCredentialInfoDatabricksGcpServiceAccountOutputReference", version: "15.3.1" };
function dataDatabricksStorageCredentialStorageCredentialInfoToTerraform(struct) {
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
return struct;
}
if (cdktf.isComplexElement(struct)) {
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
}
return {
comment: cdktf.stringToTerraform(struct.comment),
created_at: cdktf.numberToTerraform(struct.createdAt),
created_by: cdktf.stringToTerraform(struct.createdBy),
full_name: cdktf.stringToTerraform(struct.fullName),
id: cdktf.stringToTerraform(struct.id),
isolation_mode: cdktf.stringToTerraform(struct.isolationMode),
metastore_id: cdktf.stringToTerraform(struct.metastoreId),
name: cdktf.stringToTerraform(struct.name),
owner: cdktf.stringToTerraform(struct.owner),
read_only: cdktf.booleanToTerraform(struct.readOnly),
updated_at: cdktf.numberToTerraform(struct.updatedAt),
updated_by: cdktf.stringToTerraform(struct.updatedBy),
used_for_managed_storage: cdktf.booleanToTerraform(struct.usedForManagedStorage),
aws_iam_role: dataDatabricksStorageCredentialStorageCredentialInfoAwsIamRoleToTerraform(struct.awsIamRole),
azure_managed_identity: dataDatabricksStorageCredentialStorageCredentialInfoAzureManagedIdentityToTerraform(struct.azureManagedIdentity),
azure_service_principal: dataDatabricksStorageCredentialStorageCredentialInfoAzureServicePrincipalToTerraform(struct.azureServicePrincipal),
cloudflare_api_token: dataDatabricksStorageCredentialStorageCredentialInfoCloudflareApiTokenToTerraform(struct.cloudflareApiToken),
databricks_gcp_service_account: dataDatabricksStorageCredentialStorageCredentialInfoDatabricksGcpServiceAccountToTerraform(struct.databricksGcpServiceAccount),
};
}
function dataDatabricksStorageCredentialStorageCredentialInfoToHclTerraform(struct) {
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
return struct;
}
if (cdktf.isComplexElement(struct)) {
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
}
const attrs = {
comment: {
value: cdktf.stringToHclTerraform(struct.comment),
isBlock: false,
type: "simple",
storageClassType: "string",
},
created_at: {
value: cdktf.numberToHclTerraform(struct.createdAt),
isBlock: false,
type: "simple",
storageClassType: "number",
},
created_by: {
value: cdktf.stringToHclTerraform(struct.createdBy),
isBlock: false,
type: "simple",
storageClassType: "string",
},
full_name: {
value: cdktf.stringToHclTerraform(struct.fullName),
isBlock: false,
type: "simple",
storageClassType: "string",
},
id: {
value: cdktf.stringToHclTerraform(struct.id),
isBlock: false,
type: "simple",
storageClassType: "string",
},
isolation_mode: {
value: cdktf.stringToHclTerraform(struct.isolationMode),
isBlock: false,
type: "simple",
storageClassType: "string",
},
metastore_id: {
value: cdktf.stringToHclTerraform(struct.metastoreId),
isBlock: false,
type: "simple",
storageClassType: "string",
},
name: {
value: cdktf.stringToHclTerraform(struct.name),
isBlock: false,
type: "simple",
storageClassType: "string",
},
owner: {
value: cdktf.stringToHclTerraform(struct.owner),
isBlock: false,
type: "simple",
storageClassType: "string",
},
read_only: {
value: cdktf.booleanToHclTerraform(struct.readOnly),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
updated_at: {
value: cdktf.numberToHclTerraform(struct.updatedAt),
isBlock: false,
type: "simple",
storageClassType: "number",
},
updated_by: {
value: cdktf.stringToHclTerraform(struct.updatedBy),
isBlock: false,
type: "simple",
storageClassType: "string",
},
used_for_managed_storage: {
value: cdktf.booleanToHclTerraform(struct.usedForManagedStorage),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
aws_iam_role: {
value: dataDatabricksStorageCredentialStorageCredentialInfoAwsIamRoleToHclTerraform(struct.awsIamRole),
isBlock: true,
type: "list",
storageClassType: "DataDatabricksStorageCredentialStorageCredentialInfoAwsIamRoleList",
},
azure_managed_identity: {
value: dataDatabricksStorageCredentialStorageCredentialInfoAzureManagedIdentityToHclTerraform(struct.azureManagedIdentity),
isBlock: true,
type: "list",
storageClassType: "DataDatabricksStorageCredentialStorageCredentialInfoAzureManagedIdentityList",
},
azure_service_principal: {
value: dataDatabricksStorageCredentialStorageCredentialInfoAzureServicePrincipalToHclTerraform(struct.azureServicePrincipal),
isBlock: true,
type: "list",
storageClassType: "DataDatabricksStorageCredentialStorageCredentialInfoAzureServicePrincipalList",
},
cloudflare_api_token: {
value: dataDatabricksStorageCredentialStorageCredentialInfoCloudflareApiTokenToHclTerraform(struct.cloudflareApiToken),
isBlock: true,
type: "list",
storageClassType: "DataDatabricksStorageCredentialStorageCredentialInfoCloudflareApiTokenList",
},
databricks_gcp_service_account: {
value: dataDatabricksStorageCredentialStorageCredentialInfoDatabricksGcpServiceAccountToHclTerraform(struct.databricksGcpServiceAccount),
isBlock: true,
type: "list",
storageClassType: "DataDatabricksStorageCredentialStorageCredentialInfoDatabricksGcpServiceAccountList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class DataDatabricksStorageCredentialStorageCredentialInfoOutputReference extends cdktf.ComplexObject {
/**
* @param terraformResource The parent resource
* @param terraformAttribute The attribute on the parent resource this class is referencing
*/
constructor(terraformResource, terraformAttribute) {
super(terraformResource, terraformAttribute, false, 0);
this.isEmptyObject = false;
// aws_iam_role - computed: false, optional: true, required: false
this._awsIamRole = new DataDatabricksStorageCredentialStorageCredentialInfoAwsIamRoleOutputReference(this, "aws_iam_role");
// azure_managed_identity - computed: false, optional: true, required: false
this._azureManagedIdentity = new DataDatabricksStorageCredentialStorageCredentialInfoAzureManagedIdentityOutputReference(this, "azure_managed_identity");
// azure_service_principal - computed: false, optional: true, required: false
this._azureServicePrincipal = new DataDatabricksStorageCredentialStorageCredentialInfoAzureServicePrincipalOutputReference(this, "azure_service_principal");
// cloudflare_api_token - computed: false, optional: true, required: false
this._cloudflareApiToken = new DataDatabricksStorageCredentialStorageCredentialInfoCloudflareApiTokenOutputReference(this, "cloudflare_api_token");
// databricks_gcp_service_account - computed: false, optional: true, required: false
this._databricksGcpServiceAccount = new DataDatabricksStorageCredentialStorageCredentialInfoDatabricksGcpServiceAccountOutputReference(this, "databricks_gcp_service_account");
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._comment !== undefined) {
hasAnyValues = true;
internalValueResult.comment = this._comment;
}
if (this._createdAt !== undefined) {
hasAnyValues = true;
internalValueResult.createdAt = this._createdAt;
}
if (this._createdBy !== undefined) {
hasAnyValues = true;
internalValueResult.createdBy = this._createdBy;
}
if (this._fullName !== undefined) {
hasAnyValues = true;
internalValueResult.fullName = this._fullName;
}
if (this._id !== undefined) {
hasAnyValues = true;
internalValueResult.id = this._id;
}
if (this._isolationMode !== undefined) {
hasAnyValues = true;
internalValueResult.isolationMode = this._isolationMode;
}
if (this._metastoreId !== undefined) {
hasAnyValues = true;
internalValueResult.metastoreId = this._metastoreId;
}
if (this._name !== undefined) {
hasAnyValues = true;
internalValueResult.name = this._name;
}
if (this._owner !== undefined) {
hasAnyValues = true;
internalValueResult.owner = this._owner;
}
if (this._readOnly !== undefined) {
hasAnyValues = true;
internalValueResult.readOnly = this._readOnly;
}
if (this._updatedAt !== undefined) {
hasAnyValues = true;
internalValueResult.updatedAt = this._updatedAt;
}
if (this._updatedBy !== undefined) {
hasAnyValues = true;
internalValueResult.updatedBy = this._updatedBy;
}
if (this._usedForManagedStorage !== undefined) {
hasAnyValues = true;
internalValueResult.usedForManagedStorage = this._usedForManagedStorage;
}
if (this._awsIamRole?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.awsIamRole = this._awsIamRole?.internalValue;
}
if (this._azureManagedIdentity?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.azureManagedIdentity = this._azureManagedIdentity?.internalValue;
}
if (this._azureServicePrincipal?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.azureServicePrincipal = this._azureServicePrincipal?.internalValue;
}
if (this._cloudflareApiToken?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.cloudflareApiToken = this._cloudflareApiToken?.internalValue;
}
if (this._databricksGcpServiceAccount?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.databricksGcpServiceAccount = this._databricksGcpServiceAccount?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._comment = undefined;
this._createdAt = undefined;
this._createdBy = undefined;
this._fullName = undefined;
this._id = undefined;
this._isolationMode = undefined;
this._metastoreId = undefined;
this._name = undefined;
this._owner = undefined;
this._readOnly = undefined;
this._updatedAt = undefined;
this._updatedBy = undefined;
this._usedForManagedStorage = undefined;
this._awsIamRole.internalValue = undefined;
this._azureManagedIdentity.internalValue = undefined;
this._azureServicePrincipal.internalValue = undefined;
this._cloudflareApiToken.internalValue = undefined;
this._databricksGcpServiceAccount.internalValue = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._comment = value.comment;
this._createdAt = value.createdAt;
this._createdBy = value.createdBy;
this._fullName = value.fullName;
this._id = value.id;
this._isolationMode = value.isolationMode;
this._metastoreId = value.metastoreId;
this._name = value.name;
this._owner = value.owner;
this._readOnly = value.readOnly;
this._updatedAt = value.updatedAt;
this._updatedBy = value.updatedBy;
this._usedForManagedStorage = value.usedForManagedStorage;
this._awsIamRole.internalValue = value.awsIamRole;
this._azureManagedIdentity.internalValue = value.azureManagedIdentity;
this._azureServicePrincipal.internalValue = value.azureServicePrincipal;
this._cloudflareApiToken.internalValue = value.cloudflareApiToken;
this._databricksGcpServiceAccount.internalValue = value.databricksGcpServiceAccount;
}
}
get comment() {
return this.getStringAttribute('comment');
}
set comment(value) {
this._comment = value;
}
resetComment() {
this._comment = undefined;
}
// Temporarily expose input value. Use with caution.
get commentInput() {
return this._comment;
}
get createdAt() {
return this.getNumberAttribute('created_at');
}
set createdAt(value) {
this._createdAt = value;
}
resetCreatedAt() {
this._createdAt = undefined;
}
// Temporarily expose input value. Use with caution.
get createdAtInput() {
return this._createdAt;
}
get createdBy() {
return this.getStringAttribute('created_by');
}
set createdBy(value) {
this._createdBy = value;
}
resetCreatedBy() {
this._createdBy = undefined;
}
// Temporarily expose input value. Use with caution.
get createdByInput() {
return this._createdBy;
}
get fullName() {
return this.getStringAttribute('full_name');
}
set fullName(value) {
this._fullName = value;
}
resetFullName() {
this._fullName = undefined;
}
// Temporarily expose input value. Use with caution.
get fullNameInput() {
return this._fullName;
}
get id() {
return this.getStringAttribute('id');
}
set id(value) {
this._id = value;
}
resetId() {
this._id = undefined;
}
// Temporarily expose input value. Use with caution.
get idInput() {
return this._id;
}
get isolationMode() {
return this.getStringAttribute('isolation_mode');
}
set isolationMode(value) {
this._isolationMode = value;
}
resetIsolationMode() {
this._isolationMode = undefined;
}
// Temporarily expose input value. Use with caution.
get isolationModeInput() {
return this._isolationMode;
}
get metastoreId() {
return this.getStringAttribute('metastore_id');
}
set metastoreId(value) {
this._metastoreId = value;
}
resetMetastoreId() {
this._metastoreId = undefined;
}
// Temporarily expose input value. Use with caution.
get metastoreIdInput() {
return this._metastoreId;
}
get name() {
return this.getStringAttribute('name');
}
set name(value) {
this._name = value;
}
resetName() {
this._name = undefined;
}
// Temporarily expose input value. Use with caution.
get nameInput() {
return this._name;
}
get owner() {
return this.getStringAttribute('owner');
}
set owner(value) {
this._owner = value;
}
resetOwner() {
this._owner = undefined;
}
// Temporarily expose input value. Use with caution.
get ownerInput() {
return this._owner;
}
get readOnly() {
return this.getBooleanAttribute('read_only');
}
set readOnly(value) {
this._readOnly = value;
}
resetReadOnly() {
this._readOnly = undefined;
}
// Temporarily expose input value. Use with caution.
get readOnlyInput() {
return this._readOnly;
}
get updatedAt() {
return this.getNumberAttribute('updated_at');
}
set updatedAt(value) {
this._updatedAt = value;
}
resetUpdatedAt() {
this._updatedAt = undefined;
}
// Temporarily expose input value. Use with caution.
get updatedAtInput() {
return this._updatedAt;
}
get updatedBy() {
return this.getStringAttribute('updated_by');
}
set updatedBy(value) {
this._updatedBy = value;
}
resetUpdatedBy() {
this._updatedBy = undefined;
}
// Temporarily expose input value. Use with caution.
get updatedByInput() {
return this._updatedBy;
}
get usedForManagedStorage() {
return this.getBooleanAttribute('used_for_managed_storage');
}
set usedForManagedStorage(value) {
this._usedForManagedStorage = value;
}
resetUsedForManagedStorage() {
this._usedForManagedStorage = undefined;
}
// Temporarily expose input value. Use with caution.
get usedForManagedStorageInput() {
return this._usedForManagedStorage;
}
get awsIamRole() {
return this._awsIamRole;
}
putAwsIamRole(value) {
this._awsIamRole.internalValue = value;
}
resetAwsIamRole() {
this._awsIamRole.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get awsIamRoleInput() {
return this._awsIamRole.internalValue;
}
get azureManagedIdentity() {
return this._azureManagedIdentity;
}
putAzureManagedIdentity(value) {
this._azureManagedIdentity.internalValue = value;
}
resetAzureManagedIdentity() {
this._azureManagedIdentity.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get azureManagedIdentityInput() {
return this._azureManagedIdentity.internalValue;
}
get azureServicePrincipal() {
return this._azureServicePrincipal;
}
putAzureServicePrincipal(value) {
this._azureServicePrincipal.internalValue = value;
}
resetAzureServicePrincipal() {
this._azureServicePrincipal.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get azureServicePrincipalInput() {
return this._azureServicePrincipal.internalValue;
}
get cloudflareApiToken() {
return this._cloudflareApiToken;
}
putCloudflareApiToken(value) {
this._cloudflareApiToken.internalValue = value;
}
resetCloudflareApiToken() {
this._cloudflareApiToken.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get cloudflareApiTokenInput() {
return this._cloudflareApiToken.internalValue;
}
get databricksGcpServiceAccount() {
return this._databricksGcpServiceAccount;
}
putDatabricksGcpServiceAccount(value) {
this._databricksGcpServiceAccount.internalValue = value;
}
resetDatabricksGcpServiceAccount() {
this._databricksGcpServiceAccount.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get databricksGcpServiceAccountInput() {
return this._databricksGcpServiceAccount.internalValue;
}
}
exports.DataDatabricksStorageCredentialStorageCredentialInfoOutputReference = DataDatabricksStorageCredentialStorageCredentialInfoOutputReference;
_f = JSII_RTTI_SYMBOL_1;
DataDatabricksStorageCredentialStorageCredentialInfoOutputReference[_f] = { fqn: "@cdktf/provider-databricks.dataDatabricksStorageCredential.DataDatabricksStorageCredentialStorageCredentialInfoOutputReference", version: "15.3.1" };
/**
* Represents a {@link https://registry.terraform.io/providers/databricks/databricks/1.86.0/docs/data-sources/storage_credential databricks_storage_credential}
*/
class DataDatabricksStorageCredential extends cdktf.TerraformDataSource {
// ==============
// STATIC Methods
// ==============
/**
* Generates CDKTF code for importing a DataDatabricksStorageCredential resource upon running "cdktf plan <stack-name>"
* @param scope The scope in which to define this construct
* @param importToId The construct id used in the generated config for the DataDatabricksStorageCredential to import
* @param importFromId The id of the existing DataDatabricksStorageCredential that should be imported. Refer to the {@link https://registry.terraform.io/providers/databricks/databricks/1.86.0/docs/data-sources/storage_credential#import import section} in the documentation of this resource for the id to use
* @param provider? Optional instance of the provider where the DataDatabricksStorageCredential to import is found
*/
static generateConfigForImport(scope, importToId, importFromId, provider) {
return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "databricks_storage_credential", importId: importFromId, provider });
}
// ===========
// INITIALIZER
// ===========
/**
* Create a new {@link https://registry.terraform.io/providers/databricks/databricks/1.86.0/docs/data-sources/storage_credential databricks_storage_credential} Data Source
*
* @param scope The scope in which to define this construct
* @param id The scoped construct ID. Must be unique amongst siblings in the same scope
* @param options DataDatabricksStorageCredentialConfig
*/
constructor(scope, id, config) {
super(scope, id, {
terraformResourceType: 'databricks_storage_credential',
terraformGeneratorMetadata: {
providerName: 'databricks',
providerVersion: '1.86.0',
providerVersionConstraint: '~> 1.0'
},
provider: config.provider,
dependsOn: config.dependsOn,
count: config.count,
lifecycle: config.lifecycle,
provisioners: config.provisioners,
connection: config.connection,
forEach: config.forEach
});
// storage_credential_info - computed: false, optional: true, required: false
this._storageCredentialInfo = new DataDatabricksStorageCredentialStorageCredentialInfoOutputReference(this, "storage_credential_info");
this._id = config.id;
this._name = config.name;
this._storageCredentialInfo.internalValue = config.storageCredentialInfo;
}
get id() {
return this.getStringAttribute('id');
}
set id(value) {
this._id = value;
}
resetId() {
this._id = undefined;
}
// Temporarily expose in