aws.cloudfront.FieldLevelEncryptionProfile
Explore with Pulumi AI
Provides a CloudFront Field-level Encryption Profile resource.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
import * as std from "@pulumi/std";
const example = new aws.cloudfront.PublicKey("example", {
comment: "test public key",
encodedKey: std.file({
input: "public_key.pem",
}).then(invoke => invoke.result),
name: "test_key",
});
const test = new aws.cloudfront.FieldLevelEncryptionProfile("test", {
comment: "test comment",
name: "test profile",
encryptionEntities: {
items: [{
publicKeyId: example.id,
providerId: "test provider",
fieldPatterns: {
items: ["DateOfBirth"],
},
}],
},
});
import pulumi
import pulumi_aws as aws
import pulumi_std as std
example = aws.cloudfront.PublicKey("example",
comment="test public key",
encoded_key=std.file(input="public_key.pem").result,
name="test_key")
test = aws.cloudfront.FieldLevelEncryptionProfile("test",
comment="test comment",
name="test profile",
encryption_entities={
"items": [{
"public_key_id": example.id,
"provider_id": "test provider",
"field_patterns": {
"items": ["DateOfBirth"],
},
}],
})
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudfront"
"github.com/pulumi/pulumi-std/sdk/go/std"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
invokeFile, err := std.File(ctx, &std.FileArgs{
Input: "public_key.pem",
}, nil)
if err != nil {
return err
}
example, err := cloudfront.NewPublicKey(ctx, "example", &cloudfront.PublicKeyArgs{
Comment: pulumi.String("test public key"),
EncodedKey: pulumi.String(invokeFile.Result),
Name: pulumi.String("test_key"),
})
if err != nil {
return err
}
_, err = cloudfront.NewFieldLevelEncryptionProfile(ctx, "test", &cloudfront.FieldLevelEncryptionProfileArgs{
Comment: pulumi.String("test comment"),
Name: pulumi.String("test profile"),
EncryptionEntities: &cloudfront.FieldLevelEncryptionProfileEncryptionEntitiesArgs{
Items: cloudfront.FieldLevelEncryptionProfileEncryptionEntitiesItemArray{
&cloudfront.FieldLevelEncryptionProfileEncryptionEntitiesItemArgs{
PublicKeyId: example.ID(),
ProviderId: pulumi.String("test provider"),
FieldPatterns: &cloudfront.FieldLevelEncryptionProfileEncryptionEntitiesItemFieldPatternsArgs{
Items: pulumi.StringArray{
pulumi.String("DateOfBirth"),
},
},
},
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
using Std = Pulumi.Std;
return await Deployment.RunAsync(() =>
{
var example = new Aws.CloudFront.PublicKey("example", new()
{
Comment = "test public key",
EncodedKey = Std.File.Invoke(new()
{
Input = "public_key.pem",
}).Apply(invoke => invoke.Result),
Name = "test_key",
});
var test = new Aws.CloudFront.FieldLevelEncryptionProfile("test", new()
{
Comment = "test comment",
Name = "test profile",
EncryptionEntities = new Aws.CloudFront.Inputs.FieldLevelEncryptionProfileEncryptionEntitiesArgs
{
Items = new[]
{
new Aws.CloudFront.Inputs.FieldLevelEncryptionProfileEncryptionEntitiesItemArgs
{
PublicKeyId = example.Id,
ProviderId = "test provider",
FieldPatterns = new Aws.CloudFront.Inputs.FieldLevelEncryptionProfileEncryptionEntitiesItemFieldPatternsArgs
{
Items = new[]
{
"DateOfBirth",
},
},
},
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.cloudfront.PublicKey;
import com.pulumi.aws.cloudfront.PublicKeyArgs;
import com.pulumi.aws.cloudfront.FieldLevelEncryptionProfile;
import com.pulumi.aws.cloudfront.FieldLevelEncryptionProfileArgs;
import com.pulumi.aws.cloudfront.inputs.FieldLevelEncryptionProfileEncryptionEntitiesArgs;
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 example = new PublicKey("example", PublicKeyArgs.builder()
.comment("test public key")
.encodedKey(StdFunctions.file(FileArgs.builder()
.input("public_key.pem")
.build()).result())
.name("test_key")
.build());
var test = new FieldLevelEncryptionProfile("test", FieldLevelEncryptionProfileArgs.builder()
.comment("test comment")
.name("test profile")
.encryptionEntities(FieldLevelEncryptionProfileEncryptionEntitiesArgs.builder()
.items(FieldLevelEncryptionProfileEncryptionEntitiesItemArgs.builder()
.publicKeyId(example.id())
.providerId("test provider")
.fieldPatterns(FieldLevelEncryptionProfileEncryptionEntitiesItemFieldPatternsArgs.builder()
.items("DateOfBirth")
.build())
.build())
.build())
.build());
}
}
resources:
example:
type: aws:cloudfront:PublicKey
properties:
comment: test public key
encodedKey:
fn::invoke:
Function: std:file
Arguments:
input: public_key.pem
Return: result
name: test_key
test:
type: aws:cloudfront:FieldLevelEncryptionProfile
properties:
comment: test comment
name: test profile
encryptionEntities:
items:
- publicKeyId: ${example.id}
providerId: test provider
fieldPatterns:
items:
- DateOfBirth
Create FieldLevelEncryptionProfile Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new FieldLevelEncryptionProfile(name: string, args: FieldLevelEncryptionProfileArgs, opts?: CustomResourceOptions);
@overload
def FieldLevelEncryptionProfile(resource_name: str,
args: FieldLevelEncryptionProfileArgs,
opts: Optional[ResourceOptions] = None)
@overload
def FieldLevelEncryptionProfile(resource_name: str,
opts: Optional[ResourceOptions] = None,
encryption_entities: Optional[FieldLevelEncryptionProfileEncryptionEntitiesArgs] = None,
comment: Optional[str] = None,
name: Optional[str] = None)
func NewFieldLevelEncryptionProfile(ctx *Context, name string, args FieldLevelEncryptionProfileArgs, opts ...ResourceOption) (*FieldLevelEncryptionProfile, error)
public FieldLevelEncryptionProfile(string name, FieldLevelEncryptionProfileArgs args, CustomResourceOptions? opts = null)
public FieldLevelEncryptionProfile(String name, FieldLevelEncryptionProfileArgs args)
public FieldLevelEncryptionProfile(String name, FieldLevelEncryptionProfileArgs args, CustomResourceOptions options)
type: aws:cloudfront:FieldLevelEncryptionProfile
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args FieldLevelEncryptionProfileArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args FieldLevelEncryptionProfileArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args FieldLevelEncryptionProfileArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args FieldLevelEncryptionProfileArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args FieldLevelEncryptionProfileArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var fieldLevelEncryptionProfileResource = new Aws.CloudFront.FieldLevelEncryptionProfile("fieldLevelEncryptionProfileResource", new()
{
EncryptionEntities = new Aws.CloudFront.Inputs.FieldLevelEncryptionProfileEncryptionEntitiesArgs
{
Items = new[]
{
new Aws.CloudFront.Inputs.FieldLevelEncryptionProfileEncryptionEntitiesItemArgs
{
FieldPatterns = new Aws.CloudFront.Inputs.FieldLevelEncryptionProfileEncryptionEntitiesItemFieldPatternsArgs
{
Items = new[]
{
"string",
},
},
ProviderId = "string",
PublicKeyId = "string",
},
},
},
Comment = "string",
Name = "string",
});
example, err := cloudfront.NewFieldLevelEncryptionProfile(ctx, "fieldLevelEncryptionProfileResource", &cloudfront.FieldLevelEncryptionProfileArgs{
EncryptionEntities: &cloudfront.FieldLevelEncryptionProfileEncryptionEntitiesArgs{
Items: cloudfront.FieldLevelEncryptionProfileEncryptionEntitiesItemArray{
&cloudfront.FieldLevelEncryptionProfileEncryptionEntitiesItemArgs{
FieldPatterns: &cloudfront.FieldLevelEncryptionProfileEncryptionEntitiesItemFieldPatternsArgs{
Items: pulumi.StringArray{
pulumi.String("string"),
},
},
ProviderId: pulumi.String("string"),
PublicKeyId: pulumi.String("string"),
},
},
},
Comment: pulumi.String("string"),
Name: pulumi.String("string"),
})
var fieldLevelEncryptionProfileResource = new FieldLevelEncryptionProfile("fieldLevelEncryptionProfileResource", FieldLevelEncryptionProfileArgs.builder()
.encryptionEntities(FieldLevelEncryptionProfileEncryptionEntitiesArgs.builder()
.items(FieldLevelEncryptionProfileEncryptionEntitiesItemArgs.builder()
.fieldPatterns(FieldLevelEncryptionProfileEncryptionEntitiesItemFieldPatternsArgs.builder()
.items("string")
.build())
.providerId("string")
.publicKeyId("string")
.build())
.build())
.comment("string")
.name("string")
.build());
field_level_encryption_profile_resource = aws.cloudfront.FieldLevelEncryptionProfile("fieldLevelEncryptionProfileResource",
encryption_entities={
"items": [{
"fieldPatterns": {
"items": ["string"],
},
"providerId": "string",
"publicKeyId": "string",
}],
},
comment="string",
name="string")
const fieldLevelEncryptionProfileResource = new aws.cloudfront.FieldLevelEncryptionProfile("fieldLevelEncryptionProfileResource", {
encryptionEntities: {
items: [{
fieldPatterns: {
items: ["string"],
},
providerId: "string",
publicKeyId: "string",
}],
},
comment: "string",
name: "string",
});
type: aws:cloudfront:FieldLevelEncryptionProfile
properties:
comment: string
encryptionEntities:
items:
- fieldPatterns:
items:
- string
providerId: string
publicKeyId: string
name: string
FieldLevelEncryptionProfile Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The FieldLevelEncryptionProfile resource accepts the following input properties:
- Encryption
Entities FieldLevel Encryption Profile Encryption Entities - The encryption entities config block for field-level encryption profiles that contains an attribute
items
which includes the encryption key and field pattern specifications. - Comment string
- An optional comment about the Field Level Encryption Profile.
- Name string
- The name of the Field Level Encryption Profile.
- Encryption
Entities FieldLevel Encryption Profile Encryption Entities Args - The encryption entities config block for field-level encryption profiles that contains an attribute
items
which includes the encryption key and field pattern specifications. - Comment string
- An optional comment about the Field Level Encryption Profile.
- Name string
- The name of the Field Level Encryption Profile.
- encryption
Entities FieldLevel Encryption Profile Encryption Entities - The encryption entities config block for field-level encryption profiles that contains an attribute
items
which includes the encryption key and field pattern specifications. - comment String
- An optional comment about the Field Level Encryption Profile.
- name String
- The name of the Field Level Encryption Profile.
- encryption
Entities FieldLevel Encryption Profile Encryption Entities - The encryption entities config block for field-level encryption profiles that contains an attribute
items
which includes the encryption key and field pattern specifications. - comment string
- An optional comment about the Field Level Encryption Profile.
- name string
- The name of the Field Level Encryption Profile.
- encryption_
entities FieldLevel Encryption Profile Encryption Entities Args - The encryption entities config block for field-level encryption profiles that contains an attribute
items
which includes the encryption key and field pattern specifications. - comment str
- An optional comment about the Field Level Encryption Profile.
- name str
- The name of the Field Level Encryption Profile.
- encryption
Entities Property Map - The encryption entities config block for field-level encryption profiles that contains an attribute
items
which includes the encryption key and field pattern specifications. - comment String
- An optional comment about the Field Level Encryption Profile.
- name String
- The name of the Field Level Encryption Profile.
Outputs
All input properties are implicitly available as output properties. Additionally, the FieldLevelEncryptionProfile resource produces the following output properties:
- Caller
Reference string - Internal value used by CloudFront to allow future updates to the Field Level Encryption Profile.
- Etag string
- The current version of the Field Level Encryption Profile. For example:
E2QWRUHAPOMQZL
. - Id string
- The provider-assigned unique ID for this managed resource.
- Caller
Reference string - Internal value used by CloudFront to allow future updates to the Field Level Encryption Profile.
- Etag string
- The current version of the Field Level Encryption Profile. For example:
E2QWRUHAPOMQZL
. - Id string
- The provider-assigned unique ID for this managed resource.
- caller
Reference String - Internal value used by CloudFront to allow future updates to the Field Level Encryption Profile.
- etag String
- The current version of the Field Level Encryption Profile. For example:
E2QWRUHAPOMQZL
. - id String
- The provider-assigned unique ID for this managed resource.
- caller
Reference string - Internal value used by CloudFront to allow future updates to the Field Level Encryption Profile.
- etag string
- The current version of the Field Level Encryption Profile. For example:
E2QWRUHAPOMQZL
. - id string
- The provider-assigned unique ID for this managed resource.
- caller_
reference str - Internal value used by CloudFront to allow future updates to the Field Level Encryption Profile.
- etag str
- The current version of the Field Level Encryption Profile. For example:
E2QWRUHAPOMQZL
. - id str
- The provider-assigned unique ID for this managed resource.
- caller
Reference String - Internal value used by CloudFront to allow future updates to the Field Level Encryption Profile.
- etag String
- The current version of the Field Level Encryption Profile. For example:
E2QWRUHAPOMQZL
. - id String
- The provider-assigned unique ID for this managed resource.
Look up Existing FieldLevelEncryptionProfile Resource
Get an existing FieldLevelEncryptionProfile resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: FieldLevelEncryptionProfileState, opts?: CustomResourceOptions): FieldLevelEncryptionProfile
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
caller_reference: Optional[str] = None,
comment: Optional[str] = None,
encryption_entities: Optional[FieldLevelEncryptionProfileEncryptionEntitiesArgs] = None,
etag: Optional[str] = None,
name: Optional[str] = None) -> FieldLevelEncryptionProfile
func GetFieldLevelEncryptionProfile(ctx *Context, name string, id IDInput, state *FieldLevelEncryptionProfileState, opts ...ResourceOption) (*FieldLevelEncryptionProfile, error)
public static FieldLevelEncryptionProfile Get(string name, Input<string> id, FieldLevelEncryptionProfileState? state, CustomResourceOptions? opts = null)
public static FieldLevelEncryptionProfile get(String name, Output<String> id, FieldLevelEncryptionProfileState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Caller
Reference string - Internal value used by CloudFront to allow future updates to the Field Level Encryption Profile.
- Comment string
- An optional comment about the Field Level Encryption Profile.
- Encryption
Entities FieldLevel Encryption Profile Encryption Entities - The encryption entities config block for field-level encryption profiles that contains an attribute
items
which includes the encryption key and field pattern specifications. - Etag string
- The current version of the Field Level Encryption Profile. For example:
E2QWRUHAPOMQZL
. - Name string
- The name of the Field Level Encryption Profile.
- Caller
Reference string - Internal value used by CloudFront to allow future updates to the Field Level Encryption Profile.
- Comment string
- An optional comment about the Field Level Encryption Profile.
- Encryption
Entities FieldLevel Encryption Profile Encryption Entities Args - The encryption entities config block for field-level encryption profiles that contains an attribute
items
which includes the encryption key and field pattern specifications. - Etag string
- The current version of the Field Level Encryption Profile. For example:
E2QWRUHAPOMQZL
. - Name string
- The name of the Field Level Encryption Profile.
- caller
Reference String - Internal value used by CloudFront to allow future updates to the Field Level Encryption Profile.
- comment String
- An optional comment about the Field Level Encryption Profile.
- encryption
Entities FieldLevel Encryption Profile Encryption Entities - The encryption entities config block for field-level encryption profiles that contains an attribute
items
which includes the encryption key and field pattern specifications. - etag String
- The current version of the Field Level Encryption Profile. For example:
E2QWRUHAPOMQZL
. - name String
- The name of the Field Level Encryption Profile.
- caller
Reference string - Internal value used by CloudFront to allow future updates to the Field Level Encryption Profile.
- comment string
- An optional comment about the Field Level Encryption Profile.
- encryption
Entities FieldLevel Encryption Profile Encryption Entities - The encryption entities config block for field-level encryption profiles that contains an attribute
items
which includes the encryption key and field pattern specifications. - etag string
- The current version of the Field Level Encryption Profile. For example:
E2QWRUHAPOMQZL
. - name string
- The name of the Field Level Encryption Profile.
- caller_
reference str - Internal value used by CloudFront to allow future updates to the Field Level Encryption Profile.
- comment str
- An optional comment about the Field Level Encryption Profile.
- encryption_
entities FieldLevel Encryption Profile Encryption Entities Args - The encryption entities config block for field-level encryption profiles that contains an attribute
items
which includes the encryption key and field pattern specifications. - etag str
- The current version of the Field Level Encryption Profile. For example:
E2QWRUHAPOMQZL
. - name str
- The name of the Field Level Encryption Profile.
- caller
Reference String - Internal value used by CloudFront to allow future updates to the Field Level Encryption Profile.
- comment String
- An optional comment about the Field Level Encryption Profile.
- encryption
Entities Property Map - The encryption entities config block for field-level encryption profiles that contains an attribute
items
which includes the encryption key and field pattern specifications. - etag String
- The current version of the Field Level Encryption Profile. For example:
E2QWRUHAPOMQZL
. - name String
- The name of the Field Level Encryption Profile.
Supporting Types
FieldLevelEncryptionProfileEncryptionEntities, FieldLevelEncryptionProfileEncryptionEntitiesArgs
FieldLevelEncryptionProfileEncryptionEntitiesItem, FieldLevelEncryptionProfileEncryptionEntitiesItemArgs
- Field
Patterns FieldLevel Encryption Profile Encryption Entities Item Field Patterns - Object that contains an attribute
items
that contains the list of field patterns in a field-level encryption content type profile specify the fields that you want to be encrypted. - Provider
Id string - The provider associated with the public key being used for encryption.
- Public
Key stringId - The public key associated with a set of field-level encryption patterns, to be used when encrypting the fields that match the patterns.
- Field
Patterns FieldLevel Encryption Profile Encryption Entities Item Field Patterns - Object that contains an attribute
items
that contains the list of field patterns in a field-level encryption content type profile specify the fields that you want to be encrypted. - Provider
Id string - The provider associated with the public key being used for encryption.
- Public
Key stringId - The public key associated with a set of field-level encryption patterns, to be used when encrypting the fields that match the patterns.
- field
Patterns FieldLevel Encryption Profile Encryption Entities Item Field Patterns - Object that contains an attribute
items
that contains the list of field patterns in a field-level encryption content type profile specify the fields that you want to be encrypted. - provider
Id String - The provider associated with the public key being used for encryption.
- public
Key StringId - The public key associated with a set of field-level encryption patterns, to be used when encrypting the fields that match the patterns.
- field
Patterns FieldLevel Encryption Profile Encryption Entities Item Field Patterns - Object that contains an attribute
items
that contains the list of field patterns in a field-level encryption content type profile specify the fields that you want to be encrypted. - provider
Id string - The provider associated with the public key being used for encryption.
- public
Key stringId - The public key associated with a set of field-level encryption patterns, to be used when encrypting the fields that match the patterns.
- field_
patterns FieldLevel Encryption Profile Encryption Entities Item Field Patterns - Object that contains an attribute
items
that contains the list of field patterns in a field-level encryption content type profile specify the fields that you want to be encrypted. - provider_
id str - The provider associated with the public key being used for encryption.
- public_
key_ strid - The public key associated with a set of field-level encryption patterns, to be used when encrypting the fields that match the patterns.
- field
Patterns Property Map - Object that contains an attribute
items
that contains the list of field patterns in a field-level encryption content type profile specify the fields that you want to be encrypted. - provider
Id String - The provider associated with the public key being used for encryption.
- public
Key StringId - The public key associated with a set of field-level encryption patterns, to be used when encrypting the fields that match the patterns.
FieldLevelEncryptionProfileEncryptionEntitiesItemFieldPatterns, FieldLevelEncryptionProfileEncryptionEntitiesItemFieldPatternsArgs
- Items List<string>
- Items []string
- items List<String>
- items string[]
- items Sequence[str]
- items List<String>
Import
Using pulumi import
, import Cloudfront Field Level Encryption Profile using the id
. For example:
$ pulumi import aws:cloudfront/fieldLevelEncryptionProfile:FieldLevelEncryptionProfile profile K3D5EWEUDCCXON
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.