@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
105 lines • 4.42 kB
JavaScript
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.FieldLevelEncryptionConfig = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* 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",
* }],
* },
* },
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import Cloudfront Field Level Encryption Config using the `id`. For example:
*
* ```sh
* $ pulumi import aws:cloudfront/fieldLevelEncryptionConfig:FieldLevelEncryptionConfig config E74FTE3AEXAMPLE
* ```
*/
class FieldLevelEncryptionConfig extends pulumi.CustomResource {
/**
* Get an existing FieldLevelEncryptionConfig resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name, id, state, opts) {
return new FieldLevelEncryptionConfig(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of FieldLevelEncryptionConfig. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj) {
if (obj === undefined || obj === null) {
return false;
}
return obj['__pulumiType'] === FieldLevelEncryptionConfig.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["arn"] = state?.arn;
resourceInputs["callerReference"] = state?.callerReference;
resourceInputs["comment"] = state?.comment;
resourceInputs["contentTypeProfileConfig"] = state?.contentTypeProfileConfig;
resourceInputs["etag"] = state?.etag;
resourceInputs["queryArgProfileConfig"] = state?.queryArgProfileConfig;
}
else {
const args = argsOrState;
if (args?.contentTypeProfileConfig === undefined && !opts.urn) {
throw new Error("Missing required property 'contentTypeProfileConfig'");
}
if (args?.queryArgProfileConfig === undefined && !opts.urn) {
throw new Error("Missing required property 'queryArgProfileConfig'");
}
resourceInputs["comment"] = args?.comment;
resourceInputs["contentTypeProfileConfig"] = args?.contentTypeProfileConfig;
resourceInputs["queryArgProfileConfig"] = args?.queryArgProfileConfig;
resourceInputs["arn"] = undefined /*out*/;
resourceInputs["callerReference"] = undefined /*out*/;
resourceInputs["etag"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(FieldLevelEncryptionConfig.__pulumiType, name, resourceInputs, opts);
}
}
exports.FieldLevelEncryptionConfig = FieldLevelEncryptionConfig;
/** @internal */
FieldLevelEncryptionConfig.__pulumiType = 'aws:cloudfront/fieldLevelEncryptionConfig:FieldLevelEncryptionConfig';
//# sourceMappingURL=fieldLevelEncryptionConfig.js.map
;