com.pulumi.vault.pkiSecret.kotlin.SecretBackendIntermediateCertRequest.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-vault-kotlin Show documentation
Show all versions of pulumi-vault-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.vault.pkiSecret.kotlin
import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
/**
* Builder for [SecretBackendIntermediateCertRequest].
*/
@PulumiTagMarker
public class SecretBackendIntermediateCertRequestResourceBuilder internal constructor() {
public var name: String? = null
public var args: SecretBackendIntermediateCertRequestArgs =
SecretBackendIntermediateCertRequestArgs()
public var opts: CustomResourceOptions = CustomResourceOptions()
/**
* @param name The _unique_ name of the resulting resource.
*/
public fun name(`value`: String) {
this.name = value
}
/**
* @param block The arguments to use to populate this resource's properties.
*/
public suspend fun args(block: suspend SecretBackendIntermediateCertRequestArgsBuilder.() -> Unit) {
val builder = SecretBackendIntermediateCertRequestArgsBuilder()
block(builder)
this.args = builder.build()
}
/**
* @param block A bag of options that control this resource's behavior.
*/
public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
}
internal fun build(): SecretBackendIntermediateCertRequest {
val builtJavaResource =
com.pulumi.vault.pkiSecret.SecretBackendIntermediateCertRequest(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return SecretBackendIntermediateCertRequest(builtJavaResource)
}
}
/**
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as vault from "@pulumi/vault";
* const test = new vault.pkisecret.SecretBackendIntermediateCertRequest("test", {
* backend: pki.path,
* type: "internal",
* commonName: "app.my.domain",
* }, {
* dependsOn: [pki],
* });
* ```
* ```python
* import pulumi
* import pulumi_vault as vault
* test = vault.pki_secret.SecretBackendIntermediateCertRequest("test",
* backend=pki["path"],
* type="internal",
* common_name="app.my.domain",
* opts = pulumi.ResourceOptions(depends_on=[pki]))
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Vault = Pulumi.Vault;
* return await Deployment.RunAsync(() =>
* {
* var test = new Vault.PkiSecret.SecretBackendIntermediateCertRequest("test", new()
* {
* Backend = pki.Path,
* Type = "internal",
* CommonName = "app.my.domain",
* }, new CustomResourceOptions
* {
* DependsOn =
* {
* pki,
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-vault/sdk/v6/go/vault/pkiSecret"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := pkiSecret.NewSecretBackendIntermediateCertRequest(ctx, "test", &pkiSecret.SecretBackendIntermediateCertRequestArgs{
* Backend: pulumi.Any(pki.Path),
* Type: pulumi.String("internal"),
* CommonName: pulumi.String("app.my.domain"),
* }, pulumi.DependsOn([]pulumi.Resource{
* pki,
* }))
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.vault.pkiSecret.SecretBackendIntermediateCertRequest;
* import com.pulumi.vault.pkiSecret.SecretBackendIntermediateCertRequestArgs;
* import com.pulumi.resources.CustomResourceOptions;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
* public class App {
* public static void main(String[] args) {
* Pulumi.run(App::stack);
* }
* public static void stack(Context ctx) {
* var test = new SecretBackendIntermediateCertRequest("test", SecretBackendIntermediateCertRequestArgs.builder()
* .backend(pki.path())
* .type("internal")
* .commonName("app.my.domain")
* .build(), CustomResourceOptions.builder()
* .dependsOn(pki)
* .build());
* }
* }
* ```
* ```yaml
* resources:
* test:
* type: vault:pkiSecret:SecretBackendIntermediateCertRequest
* properties:
* backend: ${pki.path}
* type: internal
* commonName: app.my.domain
* options:
* dependson:
* - ${pki}
* ```
*
*/
public class SecretBackendIntermediateCertRequest internal constructor(
override val javaResource: com.pulumi.vault.pkiSecret.SecretBackendIntermediateCertRequest,
) : KotlinCustomResource(javaResource, SecretBackendIntermediateCertRequestMapper) {
/**
* Adds a Basic Constraints extension with 'CA: true'.
* Only needed as a workaround in some compatibility scenarios with Active Directory
* Certificate Services
*/
public val addBasicConstraints: Output?
get() = javaResource.addBasicConstraints().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* List of alternative names
*/
public val altNames: Output>?
get() = javaResource.altNames().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0
})
}).orElse(null)
})
/**
* The PKI secret backend the resource belongs to.
*/
public val backend: Output
get() = javaResource.backend().applyValue({ args0 -> args0 })
/**
* CN of intermediate to create
*/
public val commonName: Output
get() = javaResource.commonName().applyValue({ args0 -> args0 })
/**
* The country
*/
public val country: Output?
get() = javaResource.country().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* The CSR
*/
public val csr: Output
get() = javaResource.csr().applyValue({ args0 -> args0 })
/**
* Flag to exclude CN from SANs
*/
public val excludeCnFromSans: Output?
get() = javaResource.excludeCnFromSans().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The format of data
*/
public val format: Output?
get() = javaResource.format().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* List of alternative IPs
*/
public val ipSans: Output>?
get() = javaResource.ipSans().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0
})
}).orElse(null)
})
/**
* The number of bits to use
*/
public val keyBits: Output?
get() = javaResource.keyBits().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* The ID of the generated key.
*/
public val keyId: Output
get() = javaResource.keyId().applyValue({ args0 -> args0 })
/**
* When a new key is created with this request, optionally specifies
* the name for this. The global ref `default` may not be used as a name.
*/
public val keyName: Output
get() = javaResource.keyName().applyValue({ args0 -> args0 })
/**
* Specifies the key (either default, by name, or by identifier) to use
* for generating this request. Only suitable for `type=existing` requests.
*/
public val keyRef: Output
get() = javaResource.keyRef().applyValue({ args0 -> args0 })
/**
* The desired key type
*/
public val keyType: Output?
get() = javaResource.keyType().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* The locality
*/
public val locality: Output?
get() = javaResource.locality().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* The ID of the previously configured managed key. This field is
* required if `type` is `kms` and it conflicts with `managed_key_name`
*/
public val managedKeyId: Output?
get() = javaResource.managedKeyId().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The name of the previously configured managed key. This field is
* required if `type` is `kms` and it conflicts with `managed_key_id`
*/
public val managedKeyName: Output?
get() = javaResource.managedKeyName().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The namespace to provision the resource in.
* The value should not contain leading or trailing forward slashes.
* The `namespace` is always relative to the provider's configured [namespace](https://www.terraform.io/docs/providers/vault/index.html#namespace).
* *Available only for Vault Enterprise*.
*/
public val namespace: Output?
get() = javaResource.namespace().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* The organization
*/
public val organization: Output?
get() = javaResource.organization().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* List of other SANs
*/
public val otherSans: Output>?
get() = javaResource.otherSans().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0
})
}).orElse(null)
})
/**
* The organization unit
*/
public val ou: Output?
get() = javaResource.ou().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* The postal code
*/
public val postalCode: Output?
get() = javaResource.postalCode().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The private key
*/
public val privateKey: Output
get() = javaResource.privateKey().applyValue({ args0 -> args0 })
/**
* The private key format
*/
public val privateKeyFormat: Output?
get() = javaResource.privateKeyFormat().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The private key type
*/
public val privateKeyType: Output
get() = javaResource.privateKeyType().applyValue({ args0 -> args0 })
/**
* The province
*/
public val province: Output?
get() = javaResource.province().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* The street address
*/
public val streetAddress: Output?
get() = javaResource.streetAddress().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Type of intermediate to create. Must be either \"exported\" or \"internal\"
* or \"kms\"
*/
public val type: Output
get() = javaResource.type().applyValue({ args0 -> args0 })
/**
* List of alternative URIs
*/
public val uriSans: Output>?
get() = javaResource.uriSans().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0
})
}).orElse(null)
})
}
public object SecretBackendIntermediateCertRequestMapper :
ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.vault.pkiSecret.SecretBackendIntermediateCertRequest::class == javaResource::class
override fun map(javaResource: Resource): SecretBackendIntermediateCertRequest =
SecretBackendIntermediateCertRequest(
javaResource as
com.pulumi.vault.pkiSecret.SecretBackendIntermediateCertRequest,
)
}
/**
* @see [SecretBackendIntermediateCertRequest].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [SecretBackendIntermediateCertRequest].
*/
public suspend fun secretBackendIntermediateCertRequest(
name: String,
block: suspend SecretBackendIntermediateCertRequestResourceBuilder.() -> Unit,
): SecretBackendIntermediateCertRequest {
val builder = SecretBackendIntermediateCertRequestResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [SecretBackendIntermediateCertRequest].
* @param name The _unique_ name of the resulting resource.
*/
public fun secretBackendIntermediateCertRequest(name: String): SecretBackendIntermediateCertRequest {
val builder = SecretBackendIntermediateCertRequestResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy