com.pulumi.aws.cloudfront.kotlin.FieldLevelEncryptionConfigArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-aws-kotlin Show documentation
Show all versions of pulumi-aws-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.aws.cloudfront.kotlin
import com.pulumi.aws.cloudfront.FieldLevelEncryptionConfigArgs.builder
import com.pulumi.aws.cloudfront.kotlin.inputs.FieldLevelEncryptionConfigContentTypeProfileConfigArgs
import com.pulumi.aws.cloudfront.kotlin.inputs.FieldLevelEncryptionConfigContentTypeProfileConfigArgsBuilder
import com.pulumi.aws.cloudfront.kotlin.inputs.FieldLevelEncryptionConfigQueryArgProfileConfigArgs
import com.pulumi.aws.cloudfront.kotlin.inputs.FieldLevelEncryptionConfigQueryArgProfileConfigArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName
/**
* Provides a CloudFront Field-level Encryption Config resource.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
* const test = new aws.cloudfront.FieldLevelEncryptionConfig("test", {
* comment: "test comment",
* contentTypeProfileConfig: {
* forwardWhenContentTypeIsUnknown: true,
* contentTypeProfiles: {
* items: [{
* contentType: "application/x-www-form-urlencoded",
* format: "URLEncoded",
* }],
* },
* },
* queryArgProfileConfig: {
* forwardWhenQueryArgProfileIsUnknown: true,
* queryArgProfiles: {
* items: [{
* profileId: testAwsCloudfrontFieldLevelEncryptionProfile.id,
* queryArg: "Arg1",
* }],
* },
* },
* });
* ```
* ```python
* import pulumi
* import pulumi_aws as aws
* test = aws.cloudfront.FieldLevelEncryptionConfig("test",
* comment="test comment",
* content_type_profile_config={
* "forward_when_content_type_is_unknown": True,
* "content_type_profiles": {
* "items": [{
* "content_type": "application/x-www-form-urlencoded",
* "format": "URLEncoded",
* }],
* },
* },
* query_arg_profile_config={
* "forward_when_query_arg_profile_is_unknown": True,
* "query_arg_profiles": {
* "items": [{
* "profile_id": test_aws_cloudfront_field_level_encryption_profile["id"],
* "query_arg": "Arg1",
* }],
* },
* })
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Aws = Pulumi.Aws;
* return await Deployment.RunAsync(() =>
* {
* var test = new Aws.CloudFront.FieldLevelEncryptionConfig("test", new()
* {
* Comment = "test comment",
* ContentTypeProfileConfig = new Aws.CloudFront.Inputs.FieldLevelEncryptionConfigContentTypeProfileConfigArgs
* {
* ForwardWhenContentTypeIsUnknown = true,
* ContentTypeProfiles = new Aws.CloudFront.Inputs.FieldLevelEncryptionConfigContentTypeProfileConfigContentTypeProfilesArgs
* {
* Items = new[]
* {
* new Aws.CloudFront.Inputs.FieldLevelEncryptionConfigContentTypeProfileConfigContentTypeProfilesItemArgs
* {
* ContentType = "application/x-www-form-urlencoded",
* Format = "URLEncoded",
* },
* },
* },
* },
* QueryArgProfileConfig = new Aws.CloudFront.Inputs.FieldLevelEncryptionConfigQueryArgProfileConfigArgs
* {
* ForwardWhenQueryArgProfileIsUnknown = true,
* QueryArgProfiles = new Aws.CloudFront.Inputs.FieldLevelEncryptionConfigQueryArgProfileConfigQueryArgProfilesArgs
* {
* Items = new[]
* {
* new Aws.CloudFront.Inputs.FieldLevelEncryptionConfigQueryArgProfileConfigQueryArgProfilesItemArgs
* {
* ProfileId = testAwsCloudfrontFieldLevelEncryptionProfile.Id,
* QueryArg = "Arg1",
* },
* },
* },
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudfront"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := cloudfront.NewFieldLevelEncryptionConfig(ctx, "test", &cloudfront.FieldLevelEncryptionConfigArgs{
* Comment: pulumi.String("test comment"),
* ContentTypeProfileConfig: &cloudfront.FieldLevelEncryptionConfigContentTypeProfileConfigArgs{
* ForwardWhenContentTypeIsUnknown: pulumi.Bool(true),
* ContentTypeProfiles: &cloudfront.FieldLevelEncryptionConfigContentTypeProfileConfigContentTypeProfilesArgs{
* Items: cloudfront.FieldLevelEncryptionConfigContentTypeProfileConfigContentTypeProfilesItemArray{
* &cloudfront.FieldLevelEncryptionConfigContentTypeProfileConfigContentTypeProfilesItemArgs{
* ContentType: pulumi.String("application/x-www-form-urlencoded"),
* Format: pulumi.String("URLEncoded"),
* },
* },
* },
* },
* QueryArgProfileConfig: &cloudfront.FieldLevelEncryptionConfigQueryArgProfileConfigArgs{
* ForwardWhenQueryArgProfileIsUnknown: pulumi.Bool(true),
* QueryArgProfiles: &cloudfront.FieldLevelEncryptionConfigQueryArgProfileConfigQueryArgProfilesArgs{
* Items: cloudfront.FieldLevelEncryptionConfigQueryArgProfileConfigQueryArgProfilesItemArray{
* &cloudfront.FieldLevelEncryptionConfigQueryArgProfileConfigQueryArgProfilesItemArgs{
* ProfileId: pulumi.Any(testAwsCloudfrontFieldLevelEncryptionProfile.Id),
* QueryArg: pulumi.String("Arg1"),
* },
* },
* },
* },
* })
* 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.aws.cloudfront.FieldLevelEncryptionConfig;
* import com.pulumi.aws.cloudfront.FieldLevelEncryptionConfigArgs;
* import com.pulumi.aws.cloudfront.inputs.FieldLevelEncryptionConfigContentTypeProfileConfigArgs;
* import com.pulumi.aws.cloudfront.inputs.FieldLevelEncryptionConfigContentTypeProfileConfigContentTypeProfilesArgs;
* import com.pulumi.aws.cloudfront.inputs.FieldLevelEncryptionConfigQueryArgProfileConfigArgs;
* import com.pulumi.aws.cloudfront.inputs.FieldLevelEncryptionConfigQueryArgProfileConfigQueryArgProfilesArgs;
* 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 FieldLevelEncryptionConfig("test", FieldLevelEncryptionConfigArgs.builder()
* .comment("test comment")
* .contentTypeProfileConfig(FieldLevelEncryptionConfigContentTypeProfileConfigArgs.builder()
* .forwardWhenContentTypeIsUnknown(true)
* .contentTypeProfiles(FieldLevelEncryptionConfigContentTypeProfileConfigContentTypeProfilesArgs.builder()
* .items(FieldLevelEncryptionConfigContentTypeProfileConfigContentTypeProfilesItemArgs.builder()
* .contentType("application/x-www-form-urlencoded")
* .format("URLEncoded")
* .build())
* .build())
* .build())
* .queryArgProfileConfig(FieldLevelEncryptionConfigQueryArgProfileConfigArgs.builder()
* .forwardWhenQueryArgProfileIsUnknown(true)
* .queryArgProfiles(FieldLevelEncryptionConfigQueryArgProfileConfigQueryArgProfilesArgs.builder()
* .items(FieldLevelEncryptionConfigQueryArgProfileConfigQueryArgProfilesItemArgs.builder()
* .profileId(testAwsCloudfrontFieldLevelEncryptionProfile.id())
* .queryArg("Arg1")
* .build())
* .build())
* .build())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* test:
* type: aws:cloudfront:FieldLevelEncryptionConfig
* properties:
* comment: test comment
* contentTypeProfileConfig:
* forwardWhenContentTypeIsUnknown: true
* contentTypeProfiles:
* items:
* - contentType: application/x-www-form-urlencoded
* format: URLEncoded
* queryArgProfileConfig:
* forwardWhenQueryArgProfileIsUnknown: true
* queryArgProfiles:
* items:
* - profileId: ${testAwsCloudfrontFieldLevelEncryptionProfile.id}
* queryArg: Arg1
* ```
*
* ## Import
* Using `pulumi import`, import Cloudfront Field Level Encryption Config using the `id`. For example:
* ```sh
* $ pulumi import aws:cloudfront/fieldLevelEncryptionConfig:FieldLevelEncryptionConfig config E74FTE3AEXAMPLE
* ```
* @property comment An optional comment about the Field Level Encryption Config.
* @property contentTypeProfileConfig Content Type Profile Config specifies when to forward content if a content type isn't recognized and profiles to use as by default in a request if a query argument doesn't specify a profile to use.
* @property queryArgProfileConfig Query Arg Profile Config that specifies when to forward content if a profile isn't found and the profile that can be provided as a query argument in a request.
*/
public data class FieldLevelEncryptionConfigArgs(
public val comment: Output? = null,
public val contentTypeProfileConfig: Output? = null,
public val queryArgProfileConfig: Output? =
null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.aws.cloudfront.FieldLevelEncryptionConfigArgs =
com.pulumi.aws.cloudfront.FieldLevelEncryptionConfigArgs.builder()
.comment(comment?.applyValue({ args0 -> args0 }))
.contentTypeProfileConfig(
contentTypeProfileConfig?.applyValue({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
}),
)
.queryArgProfileConfig(
queryArgProfileConfig?.applyValue({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
}),
).build()
}
/**
* Builder for [FieldLevelEncryptionConfigArgs].
*/
@PulumiTagMarker
public class FieldLevelEncryptionConfigArgsBuilder internal constructor() {
private var comment: Output? = null
private var contentTypeProfileConfig:
Output? = null
private var queryArgProfileConfig: Output? =
null
/**
* @param value An optional comment about the Field Level Encryption Config.
*/
@JvmName("ypiaegfdoxaocckq")
public suspend fun comment(`value`: Output) {
this.comment = value
}
/**
* @param value Content Type Profile Config specifies when to forward content if a content type isn't recognized and profiles to use as by default in a request if a query argument doesn't specify a profile to use.
*/
@JvmName("olwydwgkhdcrexmb")
public suspend fun contentTypeProfileConfig(`value`: Output) {
this.contentTypeProfileConfig = value
}
/**
* @param value Query Arg Profile Config that specifies when to forward content if a profile isn't found and the profile that can be provided as a query argument in a request.
*/
@JvmName("qtwsgdyafvtwnsqu")
public suspend fun queryArgProfileConfig(`value`: Output) {
this.queryArgProfileConfig = value
}
/**
* @param value An optional comment about the Field Level Encryption Config.
*/
@JvmName("upmqepexrajqhglv")
public suspend fun comment(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.comment = mapped
}
/**
* @param value Content Type Profile Config specifies when to forward content if a content type isn't recognized and profiles to use as by default in a request if a query argument doesn't specify a profile to use.
*/
@JvmName("pfhqvsuamtonaxiy")
public suspend fun contentTypeProfileConfig(`value`: FieldLevelEncryptionConfigContentTypeProfileConfigArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.contentTypeProfileConfig = mapped
}
/**
* @param argument Content Type Profile Config specifies when to forward content if a content type isn't recognized and profiles to use as by default in a request if a query argument doesn't specify a profile to use.
*/
@JvmName("auegoaffunifudga")
public suspend fun contentTypeProfileConfig(argument: suspend FieldLevelEncryptionConfigContentTypeProfileConfigArgsBuilder.() -> Unit) {
val toBeMapped = FieldLevelEncryptionConfigContentTypeProfileConfigArgsBuilder().applySuspend {
argument()
}.build()
val mapped = of(toBeMapped)
this.contentTypeProfileConfig = mapped
}
/**
* @param value Query Arg Profile Config that specifies when to forward content if a profile isn't found and the profile that can be provided as a query argument in a request.
*/
@JvmName("vsticicashyvqfws")
public suspend fun queryArgProfileConfig(`value`: FieldLevelEncryptionConfigQueryArgProfileConfigArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.queryArgProfileConfig = mapped
}
/**
* @param argument Query Arg Profile Config that specifies when to forward content if a profile isn't found and the profile that can be provided as a query argument in a request.
*/
@JvmName("kcvamnbpbmkrlbev")
public suspend fun queryArgProfileConfig(argument: suspend FieldLevelEncryptionConfigQueryArgProfileConfigArgsBuilder.() -> Unit) {
val toBeMapped = FieldLevelEncryptionConfigQueryArgProfileConfigArgsBuilder().applySuspend {
argument()
}.build()
val mapped = of(toBeMapped)
this.queryArgProfileConfig = mapped
}
internal fun build(): FieldLevelEncryptionConfigArgs = FieldLevelEncryptionConfigArgs(
comment = comment,
contentTypeProfileConfig = contentTypeProfileConfig,
queryArgProfileConfig = queryArgProfileConfig,
)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy