import * as core from "@terrascript/core"; export interface CacheAttributesArgs extends core.SchemaArgs { cacheStaleTimeoutInSeconds?: number | core.NumberOut; } export class CacheAttributes extends core.Schema { @core.attr(Number) public cacheStaleTimeoutInSeconds?: number | core.NumberOut; } export interface NfsFileShareDefaultsArgs extends core.SchemaArgs { directoryMode?: string | core.StringOut; fileMode?: string | core.StringOut; groupId?: string | core.StringOut; ownerId?: string | core.StringOut; } export class NfsFileShareDefaults extends core.Schema { @core.attr(String) public directoryMode?: string | core.StringOut; @core.attr(String) public fileMode?: string | core.StringOut; @core.attr(String) public groupId?: string | core.StringOut; @core.attr(String) public ownerId?: string | core.StringOut; } export interface NfsFileShareArgs extends core.ResourceArgs { /** * (Optional) The Amazon Resource Name (ARN) of the storage used for audit logs. */ auditDestinationArn?: string | core.StringOut; /** * (Optional) The region of the S3 bucket used by the file share. Required when specifying `vpc_endpoin * t_dns_name`. */ bucketRegion?: string | core.StringOut; /** * (Optional) Refresh cache information. see [Cache Attributes](#cache_attributes) for more details. */ cacheAttributes?: CacheAttributes; /** * (Required) The list of clients that are allowed to access the file gateway. The list must contain ei * ther valid IP addresses or valid CIDR blocks. Set to `["0.0.0.0/0"]` to not limit access. Minimum 1 * item. Maximum 100 items. */ clientList: core.Array | core.ArrayOut; /** * (Optional) The default [storage class](https://docs.aws.amazon.com/storagegateway/latest/APIReferenc * e/API_CreateNFSFileShare.html#StorageGateway-CreateNFSFileShare-request-DefaultStorageClass) for obj * ects put into an Amazon S3 bucket by the file gateway. Defaults to `S3_STANDARD`. */ defaultStorageClass?: string | core.StringOut; /** * (Optional) The name of the file share. Must be set if an S3 prefix name is set in `location_arn`. */ fileShareName?: string | core.StringOut; /** * (Required) Amazon Resource Name (ARN) of the file gateway. */ gatewayArn: string | core.StringOut; /** * (Optional) Boolean value that enables guessing of the MIME type for uploaded objects based on file e * xtensions. Defaults to `true`. */ guessMimeTypeEnabled?: boolean | core.BooleanOut; /** * (Optional) Boolean value if `true` to use Amazon S3 server side encryption with your own AWS KMS key * , or `false` to use a key managed by Amazon S3. Defaults to `false`. */ kmsEncrypted?: boolean | core.BooleanOut; /** * (Optional) Amazon Resource Name (ARN) for KMS key used for Amazon S3 server side encryption. This va * lue can only be set when `kms_encrypted` is true. */ kmsKeyArn?: string | core.StringOut; /** * (Required) The ARN of the backed storage used for storing file data. */ locationArn: string | core.StringOut; /** * (Optional) Nested argument with file share default values. More information below. see [NFS File Sha * re Defaults](#nfs_file_share_defaults) for more details. */ nfsFileShareDefaults?: NfsFileShareDefaults; /** * (Optional) The notification policy of the file share. For more information see the [AWS Documentatio * n](https://docs.aws.amazon.com/storagegateway/latest/APIReference/API_CreateNFSFileShare.html#Storag * eGateway-CreateNFSFileShare-request-NotificationPolicy). Default value is `{}`. */ notificationPolicy?: string | core.StringOut; /** * (Optional) Access Control List permission for S3 objects. Defaults to `private`. */ objectAcl?: string | core.StringOut; /** * (Optional) Boolean to indicate write status of file share. File share does not accept writes if `tru * e`. Defaults to `false`. */ readOnly?: boolean | core.BooleanOut; /** * (Optional) Boolean who pays the cost of the request and the data download from the Amazon S3 bucket. * Set this value to `true` if you want the requester to pay instead of the bucket owner. Defaults to * false`. */ requesterPays?: boolean | core.BooleanOut; /** * (Required) The ARN of the AWS Identity and Access Management (IAM) role that a file gateway assumes * when it accesses the underlying storage. */ roleArn: string | core.StringOut; /** * (Optional) Maps a user to anonymous user. Defaults to `RootSquash`. Valid values: `RootSquash` (only * root is mapped to anonymous user), `NoSquash` (no one is mapped to anonymous user), `AllSquash` (ev * eryone is mapped to anonymous user) */ squash?: string | core.StringOut; /** * (Optional) Key-value map of resource tags. If configured with a provider [`default_tags` configurati * on block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags-configurati * on-block) present, tags with matching keys will overwrite those defined at the provider-level. */ tags?: core.Map | core.MapOut; /** * A map of tags assigned to the resource, including those inherited from the provider [`default_tags` * configuration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags- * configuration-block). */ tagsAll?: core.Map | core.MapOut; /** * (Optional) The DNS name of the VPC endpoint for S3 PrivateLink. */ vpcEndpointDnsName?: string | core.StringOut; } export class NfsFileShare extends core.Resource { /** * Amazon Resource Name (ARN) of the NFS File Share. */ @core.attr(String, { computed: true }) public arn!: string | core.StringOut; /** * (Optional) The Amazon Resource Name (ARN) of the storage used for audit logs. */ @core.attr(String) public auditDestinationArn?: string | core.StringOut; /** * (Optional) The region of the S3 bucket used by the file share. Required when specifying `vpc_endpoin * t_dns_name`. */ @core.attr(String) public bucketRegion?: string | core.StringOut; /** * (Optional) Refresh cache information. see [Cache Attributes](#cache_attributes) for more details. */ @core.attr(CacheAttributes) public cacheAttributes?: CacheAttributes; /** * (Required) The list of clients that are allowed to access the file gateway. The list must contain ei * ther valid IP addresses or valid CIDR blocks. Set to `["0.0.0.0/0"]` to not limit access. Minimum 1 * item. Maximum 100 items. */ @core.attr(String, { kind: "array" }) public clientList!: core.Array | core.ArrayOut; /** * (Optional) The default [storage class](https://docs.aws.amazon.com/storagegateway/latest/APIReferenc * e/API_CreateNFSFileShare.html#StorageGateway-CreateNFSFileShare-request-DefaultStorageClass) for obj * ects put into an Amazon S3 bucket by the file gateway. Defaults to `S3_STANDARD`. */ @core.attr(String) public defaultStorageClass?: string | core.StringOut; /** * (Optional) The name of the file share. Must be set if an S3 prefix name is set in `location_arn`. */ @core.attr(String, { computed: true }) public fileShareName?: string | core.StringOut; /** * ID of the NFS File Share. */ @core.attr(String, { computed: true }) public fileshareId!: string | core.StringOut; /** * (Required) Amazon Resource Name (ARN) of the file gateway. */ @core.attr(String) public gatewayArn!: string | core.StringOut; /** * (Optional) Boolean value that enables guessing of the MIME type for uploaded objects based on file e * xtensions. Defaults to `true`. */ @core.attr(Boolean) public guessMimeTypeEnabled?: boolean | core.BooleanOut; /** * Amazon Resource Name (ARN) of the NFS File Share. */ @core.attr(String, { computed: true }) public id!: string | core.StringOut; /** * (Optional) Boolean value if `true` to use Amazon S3 server side encryption with your own AWS KMS key * , or `false` to use a key managed by Amazon S3. Defaults to `false`. */ @core.attr(Boolean) public kmsEncrypted?: boolean | core.BooleanOut; /** * (Optional) Amazon Resource Name (ARN) for KMS key used for Amazon S3 server side encryption. This va * lue can only be set when `kms_encrypted` is true. */ @core.attr(String) public kmsKeyArn?: string | core.StringOut; /** * (Required) The ARN of the backed storage used for storing file data. */ @core.attr(String) public locationArn!: string | core.StringOut; /** * (Optional) Nested argument with file share default values. More information below. see [NFS File Sha * re Defaults](#nfs_file_share_defaults) for more details. */ @core.attr(NfsFileShareDefaults) public nfsFileShareDefaults?: NfsFileShareDefaults; /** * (Optional) The notification policy of the file share. For more information see the [AWS Documentatio * n](https://docs.aws.amazon.com/storagegateway/latest/APIReference/API_CreateNFSFileShare.html#Storag * eGateway-CreateNFSFileShare-request-NotificationPolicy). Default value is `{}`. */ @core.attr(String) public notificationPolicy?: string | core.StringOut; /** * (Optional) Access Control List permission for S3 objects. Defaults to `private`. */ @core.attr(String) public objectAcl?: string | core.StringOut; /** * File share path used by the NFS client to identify the mount point. */ @core.attr(String, { computed: true }) public path!: string | core.StringOut; /** * (Optional) Boolean to indicate write status of file share. File share does not accept writes if `tru * e`. Defaults to `false`. */ @core.attr(Boolean) public readOnly?: boolean | core.BooleanOut; /** * (Optional) Boolean who pays the cost of the request and the data download from the Amazon S3 bucket. * Set this value to `true` if you want the requester to pay instead of the bucket owner. Defaults to * false`. */ @core.attr(Boolean) public requesterPays?: boolean | core.BooleanOut; /** * (Required) The ARN of the AWS Identity and Access Management (IAM) role that a file gateway assumes * when it accesses the underlying storage. */ @core.attr(String) public roleArn!: string | core.StringOut; /** * (Optional) Maps a user to anonymous user. Defaults to `RootSquash`. Valid values: `RootSquash` (only * root is mapped to anonymous user), `NoSquash` (no one is mapped to anonymous user), `AllSquash` (ev * eryone is mapped to anonymous user) */ @core.attr(String) public squash?: string | core.StringOut; /** * (Optional) Key-value map of resource tags. If configured with a provider [`default_tags` configurati * on block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags-configurati * on-block) present, tags with matching keys will overwrite those defined at the provider-level. */ @core.attr(String, { kind: "map" }) public tags?: core.Map | core.MapOut; /** * A map of tags assigned to the resource, including those inherited from the provider [`default_tags` * configuration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags- * configuration-block). */ @core.attr(String, { computed: true, kind: "map" }) public tagsAll?: core.Map | core.MapOut; /** * (Optional) The DNS name of the VPC endpoint for S3 PrivateLink. */ @core.attr(String) public vpcEndpointDnsName?: string | core.StringOut; constructor(name: string, args?: NfsFileShareArgs) { super(name, "aws_storagegateway_nfs_file_share", args); } public override getNamespace(): string { return "aws_storagegateway"; } }