com.pulumi.vault.kotlin.AuditRequestHeaderArgs.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.kotlin
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.vault.AuditRequestHeaderArgs.builder
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName
/**
* Manages additional request headers that appear in audited requests.
* > **Note**
* Because of the way the [sys/config/auditing/request-headers API](https://www.vaultproject.io/api-docs/system/config-auditing)
* is implemented in Vault, this resource will manage existing audited headers with
* matching names without requiring import.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as vault from "@pulumi/vault";
* const xForwardedFor = new vault.AuditRequestHeader("x_forwarded_for", {
* name: "X-Forwarded-For",
* hmac: false,
* });
* ```
* ```python
* import pulumi
* import pulumi_vault as vault
* x_forwarded_for = vault.AuditRequestHeader("x_forwarded_for",
* name="X-Forwarded-For",
* hmac=False)
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Vault = Pulumi.Vault;
* return await Deployment.RunAsync(() =>
* {
* var xForwardedFor = new Vault.AuditRequestHeader("x_forwarded_for", new()
* {
* Name = "X-Forwarded-For",
* Hmac = false,
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-vault/sdk/v6/go/vault"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := vault.NewAuditRequestHeader(ctx, "x_forwarded_for", &vault.AuditRequestHeaderArgs{
* Name: pulumi.String("X-Forwarded-For"),
* Hmac: pulumi.Bool(false),
* })
* 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.AuditRequestHeader;
* import com.pulumi.vault.AuditRequestHeaderArgs;
* 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 xForwardedFor = new AuditRequestHeader("xForwardedFor", AuditRequestHeaderArgs.builder()
* .name("X-Forwarded-For")
* .hmac(false)
* .build());
* }
* }
* ```
* ```yaml
* resources:
* xForwardedFor:
* type: vault:AuditRequestHeader
* name: x_forwarded_for
* properties:
* name: X-Forwarded-For
* hmac: false
* ```
*
* @property hmac Whether this header's value should be HMAC'd in the audit logs.
* @property name The name of the request header to audit.
* @property namespace Target namespace. (requires Enterprise)
*/
public data class AuditRequestHeaderArgs(
public val hmac: Output? = null,
public val name: Output? = null,
public val namespace: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.vault.AuditRequestHeaderArgs =
com.pulumi.vault.AuditRequestHeaderArgs.builder()
.hmac(hmac?.applyValue({ args0 -> args0 }))
.name(name?.applyValue({ args0 -> args0 }))
.namespace(namespace?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [AuditRequestHeaderArgs].
*/
@PulumiTagMarker
public class AuditRequestHeaderArgsBuilder internal constructor() {
private var hmac: Output? = null
private var name: Output? = null
private var namespace: Output? = null
/**
* @param value Whether this header's value should be HMAC'd in the audit logs.
*/
@JvmName("gethyxgxytywypar")
public suspend fun hmac(`value`: Output) {
this.hmac = value
}
/**
* @param value The name of the request header to audit.
*/
@JvmName("xcvslltvuaovxbkx")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value Target namespace. (requires Enterprise)
*/
@JvmName("qwtptoeuqmjjqjqh")
public suspend fun namespace(`value`: Output) {
this.namespace = value
}
/**
* @param value Whether this header's value should be HMAC'd in the audit logs.
*/
@JvmName("autfwmpmotwvpydm")
public suspend fun hmac(`value`: Boolean?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.hmac = mapped
}
/**
* @param value The name of the request header to audit.
*/
@JvmName("yjtbaqjuofbrvgkk")
public suspend fun name(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.name = mapped
}
/**
* @param value Target namespace. (requires Enterprise)
*/
@JvmName("rmtjxfdbnbfhcqev")
public suspend fun namespace(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.namespace = mapped
}
internal fun build(): AuditRequestHeaderArgs = AuditRequestHeaderArgs(
hmac = hmac,
name = name,
namespace = namespace,
)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy