Class Inventory
Specifies the inventory configuration of an S3 Bucket.
Implements
Inherited Members
Namespace: Amazon.CDK.AWS.S3
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class Inventory : IInventory
Syntax (vb)
Public Class Inventory Implements IInventory
Remarks
See: https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-inventory.html
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.S3;
Bucket bucket;
var inventory = new Inventory {
Destination = new InventoryDestination {
Bucket = bucket,
// the properties below are optional
BucketOwner = "bucketOwner",
Prefix = "prefix"
},
// the properties below are optional
Enabled = false,
Format = InventoryFormat.CSV,
Frequency = InventoryFrequency.DAILY,
IncludeObjectVersions = InventoryObjectVersion.ALL,
InventoryId = "inventoryId",
ObjectsPrefix = "objectsPrefix",
OptionalFields = new [] { "optionalFields" }
};
Synopsis
Constructors
Inventory() | Specifies the inventory configuration of an S3 Bucket. |
Properties
Destination | The destination of the inventory. |
Enabled | Whether the inventory is enabled or disabled. |
Format | The format of the inventory. |
Frequency | Frequency at which the inventory should be generated. |
IncludeObjectVersions | If the inventory should contain all the object versions or only the current one. |
InventoryId | The inventory configuration ID. |
ObjectsPrefix | The inventory will only include objects that meet the prefix filter criteria. |
OptionalFields | A list of optional fields to be included in the inventory result. |
Constructors
Inventory()
Specifies the inventory configuration of an S3 Bucket.
public Inventory()
Remarks
See: https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-inventory.html
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.S3;
Bucket bucket;
var inventory = new Inventory {
Destination = new InventoryDestination {
Bucket = bucket,
// the properties below are optional
BucketOwner = "bucketOwner",
Prefix = "prefix"
},
// the properties below are optional
Enabled = false,
Format = InventoryFormat.CSV,
Frequency = InventoryFrequency.DAILY,
IncludeObjectVersions = InventoryObjectVersion.ALL,
InventoryId = "inventoryId",
ObjectsPrefix = "objectsPrefix",
OptionalFields = new [] { "optionalFields" }
};
Properties
Destination
The destination of the inventory.
public IInventoryDestination Destination { get; set; }
Property Value
Remarks
See: https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-inventory.html
ExampleMetadata: fixture=_generated
Enabled
Whether the inventory is enabled or disabled.
public bool? Enabled { get; set; }
Property Value
bool?
Remarks
Default: true
Format
The format of the inventory.
public InventoryFormat? Format { get; set; }
Property Value
Remarks
Default: InventoryFormat.CSV
Frequency
Frequency at which the inventory should be generated.
public InventoryFrequency? Frequency { get; set; }
Property Value
Remarks
Default: InventoryFrequency.WEEKLY
IncludeObjectVersions
If the inventory should contain all the object versions or only the current one.
public InventoryObjectVersion? IncludeObjectVersions { get; set; }
Property Value
Remarks
Default: InventoryObjectVersion.ALL
InventoryId
The inventory configuration ID.
public string? InventoryId { get; set; }
Property Value
Remarks
Should be limited to 64 characters and can only contain letters, numbers, periods, dashes, and underscores.
Default: - generated ID.
ObjectsPrefix
The inventory will only include objects that meet the prefix filter criteria.
public string? ObjectsPrefix { get; set; }
Property Value
Remarks
Default: - No objects prefix
OptionalFields
A list of optional fields to be included in the inventory result.
public string[]? OptionalFields { get; set; }
Property Value
string[]
Remarks
Default: - No optional fields.