Show / Hide Table of Contents

Class Inventory

Provides a S3 bucket inventory configuration resource.

Example Usage

Add inventory configuration

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    var testBucket = new Aws.S3.Bucket("testBucket", new Aws.S3.BucketArgs
    {
    });
    var inventory = new Aws.S3.Bucket("inventory", new Aws.S3.BucketArgs
    {
    });
    var testInventory = new Aws.S3.Inventory("testInventory", new Aws.S3.InventoryArgs
    {
        Bucket = testBucket.Id,
        Destination = new Aws.S3.Inputs.InventoryDestinationArgs
        {
            Bucket = new Aws.S3.Inputs.InventoryDestinationBucketArgs
            {
                BucketArn = inventory.Arn,
                Format = "ORC",
            },
        },
        IncludedObjectVersions = "All",
        Schedule = new Aws.S3.Inputs.InventoryScheduleArgs
        {
            Frequency = "Daily",
        },
    });
}

}

Add inventory configuration with S3 bucket object prefix

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    var test = new Aws.S3.Bucket("test", new Aws.S3.BucketArgs
    {
    });
    var inventory = new Aws.S3.Bucket("inventory", new Aws.S3.BucketArgs
    {
    });
    var test_prefix = new Aws.S3.Inventory("test-prefix", new Aws.S3.InventoryArgs
    {
        Bucket = test.Id,
        Destination = new Aws.S3.Inputs.InventoryDestinationArgs
        {
            Bucket = new Aws.S3.Inputs.InventoryDestinationBucketArgs
            {
                BucketArn = inventory.Arn,
                Format = "ORC",
                Prefix = "inventory",
            },
        },
        Filter = new Aws.S3.Inputs.InventoryFilterArgs
        {
            Prefix = "documents/",
        },
        IncludedObjectVersions = "All",
        Schedule = new Aws.S3.Inputs.InventoryScheduleArgs
        {
            Frequency = "Daily",
        },
    });
}

}
Inheritance
System.Object
Resource
CustomResource
Inventory
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Aws.S3
Assembly: Pulumi.Aws.dll
Syntax
public class Inventory : CustomResource

Constructors

View Source

Inventory(String, InventoryArgs, CustomResourceOptions)

Create a Inventory resource with the given unique name, arguments, and options.

Declaration
public Inventory(string name, InventoryArgs args, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

InventoryArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

Bucket

The name of the bucket where the inventory configuration will be stored.

Declaration
public Output<string> Bucket { get; }
Property Value
Type Description
Output<System.String>
View Source

Destination

Contains information about where to publish the inventory results (documented below).

Declaration
public Output<InventoryDestination> Destination { get; }
Property Value
Type Description
Output<InventoryDestination>
View Source

Enabled

Specifies whether the inventory is enabled or disabled.

Declaration
public Output<bool?> Enabled { get; }
Property Value
Type Description
Output<System.Nullable<System.Boolean>>
View Source

Filter

Specifies an inventory filter. The inventory only includes objects that meet the filter's criteria (documented below).

Declaration
public Output<InventoryFilter> Filter { get; }
Property Value
Type Description
Output<InventoryFilter>
View Source

IncludedObjectVersions

Object versions to include in the inventory list. Valid values: All, Current.

Declaration
public Output<string> IncludedObjectVersions { get; }
Property Value
Type Description
Output<System.String>
View Source

Name

Unique identifier of the inventory configuration for the bucket.

Declaration
public Output<string> Name { get; }
Property Value
Type Description
Output<System.String>
View Source

OptionalFields

List of optional fields that are included in the inventory results. Valid values: Size, LastModifiedDate, StorageClass, ETag, IsMultipartUploaded, ReplicationStatus, EncryptionStatus, ObjectLockRetainUntilDate, ObjectLockMode, ObjectLockLegalHoldStatus, IntelligentTieringAccessTier.

Declaration
public Output<ImmutableArray<string>> OptionalFields { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<System.String>>
View Source

Schedule

Specifies the schedule for generating inventory results (documented below).

Declaration
public Output<InventorySchedule> Schedule { get; }
Property Value
Type Description
Output<InventorySchedule>

Methods

View Source

Get(String, Input<String>, InventoryState, CustomResourceOptions)

Get an existing Inventory resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

Declaration
public static Inventory Get(string name, Input<string> id, InventoryState state = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resulting resource.

Input<System.String> id

The unique provider ID of the resource to lookup.

InventoryState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
Inventory
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.