// generated from terraform resource schema import { Construct } from 'constructs'; import * as cdktf from 'cdktf'; /** * AWS Signer */ export interface SignerSigningProfileConfig extends cdktf.TerraformMetaArguments { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/signer_signing_profile.html#name SignerSigningProfile#name} */ readonly name?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/signer_signing_profile.html#name_prefix SignerSigningProfile#name_prefix} */ readonly namePrefix?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/signer_signing_profile.html#platform_id SignerSigningProfile#platform_id} */ readonly platformId: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/signer_signing_profile.html#tags SignerSigningProfile#tags} */ readonly tags?: { [key: string]: string } | cdktf.IResolvable; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/signer_signing_profile.html#tags_all SignerSigningProfile#tags_all} */ readonly tagsAll?: { [key: string]: string } | cdktf.IResolvable; /** * signature_validity_period block * * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/signer_signing_profile.html#signature_validity_period SignerSigningProfile#signature_validity_period} */ readonly signatureValidityPeriod?: SignerSigningProfileSignatureValidityPeriod; } export class SignerSigningProfileRevocationRecord extends cdktf.ComplexComputedList { // revocation_effective_from - computed: true, optional: false, required: false public get revocationEffectiveFrom() { return this.getStringAttribute('revocation_effective_from'); } // revoked_at - computed: true, optional: false, required: false public get revokedAt() { return this.getStringAttribute('revoked_at'); } // revoked_by - computed: true, optional: false, required: false public get revokedBy() { return this.getStringAttribute('revoked_by'); } } export interface SignerSigningProfileSignatureValidityPeriod { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/signer_signing_profile.html#type SignerSigningProfile#type} */ readonly type: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/signer_signing_profile.html#value SignerSigningProfile#value} */ readonly value: number; } export function signerSigningProfileSignatureValidityPeriodToTerraform(struct?: SignerSigningProfileSignatureValidityPeriodOutputReference | SignerSigningProfileSignatureValidityPeriod): any { if (!cdktf.canInspect(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } return { type: cdktf.stringToTerraform(struct!.type), value: cdktf.numberToTerraform(struct!.value), } } export class SignerSigningProfileSignatureValidityPeriodOutputReference extends cdktf.ComplexObject { private isEmptyObject = false; /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param isSingleItem True if this is a block, false if it's a list */ public constructor(terraformResource: cdktf.ITerraformResource, terraformAttribute: string, isSingleItem: boolean) { super(terraformResource, terraformAttribute, isSingleItem); } public get internalValue(): SignerSigningProfileSignatureValidityPeriod | undefined { let hasAnyValues = this.isEmptyObject; const internalValueResult: any = {}; if (this._type !== undefined) { hasAnyValues = true; internalValueResult.type = this._type; } if (this._value !== undefined) { hasAnyValues = true; internalValueResult.value = this._value; } return hasAnyValues ? internalValueResult : undefined; } public set internalValue(value: SignerSigningProfileSignatureValidityPeriod | undefined) { if (value === undefined) { this.isEmptyObject = false; this._type = undefined; this._value = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._type = value.type; this._value = value.value; } } // type - computed: false, optional: false, required: true private _type?: string; public get type() { return this.getStringAttribute('type'); } public set type(value: string) { this._type = value; } // Temporarily expose input value. Use with caution. public get typeInput() { return this._type; } // value - computed: false, optional: false, required: true private _value?: number; public get value() { return this.getNumberAttribute('value'); } public set value(value: number) { this._value = value; } // Temporarily expose input value. Use with caution. public get valueInput() { return this._value; } } /** * Represents a {@link https://www.terraform.io/docs/providers/aws/r/signer_signing_profile.html aws_signer_signing_profile} */ export class SignerSigningProfile extends cdktf.TerraformResource { // ================= // STATIC PROPERTIES // ================= public static readonly tfResourceType: string = "aws_signer_signing_profile"; // =========== // INITIALIZER // =========== /** * Create a new {@link https://www.terraform.io/docs/providers/aws/r/signer_signing_profile.html aws_signer_signing_profile} 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 SignerSigningProfileConfig */ public constructor(scope: Construct, id: string, config: SignerSigningProfileConfig) { super(scope, id, { terraformResourceType: 'aws_signer_signing_profile', terraformGeneratorMetadata: { providerName: 'aws' }, provider: config.provider, dependsOn: config.dependsOn, count: config.count, lifecycle: config.lifecycle }); this._name = config.name; this._namePrefix = config.namePrefix; this._platformId = config.platformId; this._tags = config.tags; this._tagsAll = config.tagsAll; this._signatureValidityPeriod.internalValue = config.signatureValidityPeriod; } // ========== // ATTRIBUTES // ========== // arn - computed: true, optional: false, required: false public get arn() { return this.getStringAttribute('arn'); } // id - computed: true, optional: true, required: false public get id() { return this.getStringAttribute('id'); } // name - computed: true, optional: true, required: false private _name?: string; public get name() { return this.getStringAttribute('name'); } public set name(value: string) { this._name = value; } public resetName() { this._name = undefined; } // Temporarily expose input value. Use with caution. public get nameInput() { return this._name; } // name_prefix - computed: false, optional: true, required: false private _namePrefix?: string; public get namePrefix() { return this.getStringAttribute('name_prefix'); } public set namePrefix(value: string) { this._namePrefix = value; } public resetNamePrefix() { this._namePrefix = undefined; } // Temporarily expose input value. Use with caution. public get namePrefixInput() { return this._namePrefix; } // platform_display_name - computed: true, optional: false, required: false public get platformDisplayName() { return this.getStringAttribute('platform_display_name'); } // platform_id - computed: false, optional: false, required: true private _platformId?: string; public get platformId() { return this.getStringAttribute('platform_id'); } public set platformId(value: string) { this._platformId = value; } // Temporarily expose input value. Use with caution. public get platformIdInput() { return this._platformId; } // revocation_record - computed: true, optional: false, required: false public revocationRecord(index: string) { return new SignerSigningProfileRevocationRecord(this, 'revocation_record', index); } // status - computed: true, optional: false, required: false public get status() { return this.getStringAttribute('status'); } // tags - computed: false, optional: true, required: false private _tags?: { [key: string]: string } | cdktf.IResolvable; public get tags() { // Getting the computed value is not yet implemented return this.interpolationForAttribute('tags') as any; } public set tags(value: { [key: string]: string } | cdktf.IResolvable) { this._tags = value; } public resetTags() { this._tags = undefined; } // Temporarily expose input value. Use with caution. public get tagsInput() { return this._tags; } // tags_all - computed: true, optional: true, required: false private _tagsAll?: { [key: string]: string } | cdktf.IResolvable; public get tagsAll() { // Getting the computed value is not yet implemented return this.interpolationForAttribute('tags_all') as any; } public set tagsAll(value: { [key: string]: string } | cdktf.IResolvable) { this._tagsAll = value; } public resetTagsAll() { this._tagsAll = undefined; } // Temporarily expose input value. Use with caution. public get tagsAllInput() { return this._tagsAll; } // version - computed: true, optional: false, required: false public get version() { return this.getStringAttribute('version'); } // version_arn - computed: true, optional: false, required: false public get versionArn() { return this.getStringAttribute('version_arn'); } // signature_validity_period - computed: false, optional: true, required: false private _signatureValidityPeriod = new SignerSigningProfileSignatureValidityPeriodOutputReference(this as any, "signature_validity_period", true); public get signatureValidityPeriod() { return this._signatureValidityPeriod; } public putSignatureValidityPeriod(value: SignerSigningProfileSignatureValidityPeriod) { this._signatureValidityPeriod.internalValue = value; } public resetSignatureValidityPeriod() { this._signatureValidityPeriod.internalValue = undefined; } // Temporarily expose input value. Use with caution. public get signatureValidityPeriodInput() { return this._signatureValidityPeriod.internalValue; } // ========= // SYNTHESIS // ========= protected synthesizeAttributes(): { [name: string]: any } { return { name: cdktf.stringToTerraform(this._name), name_prefix: cdktf.stringToTerraform(this._namePrefix), platform_id: cdktf.stringToTerraform(this._platformId), tags: cdktf.hashMapper(cdktf.anyToTerraform)(this._tags), tags_all: cdktf.hashMapper(cdktf.anyToTerraform)(this._tagsAll), signature_validity_period: signerSigningProfileSignatureValidityPeriodToTerraform(this._signatureValidityPeriod.internalValue), }; } }