// generated from terraform resource schema import { Construct } from 'constructs'; import * as cdktf from 'cdktf'; /** * AWS Simple Storage Service */ export interface S3ControlBucketPolicyConfig extends cdktf.TerraformMetaArguments { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3control_bucket_policy.html#bucket S3ControlBucketPolicy#bucket} */ readonly bucket: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/s3control_bucket_policy.html#policy S3ControlBucketPolicy#policy} */ readonly policy: string; } /** * Represents a {@link https://www.terraform.io/docs/providers/aws/r/s3control_bucket_policy.html aws_s3control_bucket_policy} */ export class S3ControlBucketPolicy extends cdktf.TerraformResource { // ================= // STATIC PROPERTIES // ================= public static readonly tfResourceType: string = "aws_s3control_bucket_policy"; // =========== // INITIALIZER // =========== /** * Create a new {@link https://www.terraform.io/docs/providers/aws/r/s3control_bucket_policy.html aws_s3control_bucket_policy} Resource * * @param scope The scope in which to define this construct * @param id The scoped construct ID. Must be unique amongst siblings in the same scope * @param options S3ControlBucketPolicyConfig */ public constructor(scope: Construct, id: string, config: S3ControlBucketPolicyConfig) { super(scope, id, { terraformResourceType: 'aws_s3control_bucket_policy', terraformGeneratorMetadata: { providerName: 'aws' }, provider: config.provider, dependsOn: config.dependsOn, count: config.count, lifecycle: config.lifecycle }); this._bucket = config.bucket; this._policy = config.policy; } // ========== // ATTRIBUTES // ========== // bucket - computed: false, optional: false, required: true private _bucket?: string; public get bucket() { return this.getStringAttribute('bucket'); } public set bucket(value: string) { this._bucket = value; } // Temporarily expose input value. Use with caution. public get bucketInput() { return this._bucket; } // id - computed: true, optional: true, required: false public get id() { return this.getStringAttribute('id'); } // policy - computed: false, optional: false, required: true private _policy?: string; public get policy() { return this.getStringAttribute('policy'); } public set policy(value: string) { this._policy = value; } // Temporarily expose input value. Use with caution. public get policyInput() { return this._policy; } // ========= // SYNTHESIS // ========= protected synthesizeAttributes(): { [name: string]: any } { return { bucket: cdktf.stringToTerraform(this._bucket), policy: cdktf.stringToTerraform(this._policy), }; } }