AWS Tools for Windows PowerShell
Command Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Synopsis

Calls the Amazon Simple Storage Service (S3) PutBucketInventoryConfiguration API operation.

Syntax

Write-S3BucketInventoryConfiguration
-BucketName <String>
-S3BucketDestination_AccountId <String>
-S3BucketDestination_BucketName <String>
-ExpectedBucketOwner <String>
-Schedule_Frequency <InventoryFrequency>
-InventoryConfiguration_IncludedObjectVersion <InventoryIncludedObjectVersions>
-InventoryFilter_InventoryFilterPredicate <InventoryFilterPredicate>
-S3BucketDestination_InventoryFormat <InventoryFormat>
-InventoryId <String>
-InventoryConfiguration_InventoryId <String>
-InventoryConfiguration_InventoryOptionalField <InventoryOptionalField[]>
-InventoryConfiguration_IsEnabled <Boolean>
-SSEKMS_KeyId <String>
-S3BucketDestination_Prefix <String>
-InventoryEncryption_SSES3 <SSES3>
-Select <String>
-PassThru <SwitchParameter>
-Force <SwitchParameter>
-ClientConfig <AmazonS3Config>
-UseAccelerateEndpoint <SwitchParameter>
-UseDualstackEndpoint <SwitchParameter>
-ForcePathStyleAddressing <Boolean>

Description

This operation is not supported by directory buckets. This implementation of the PUT action adds an inventory configuration (identified by the inventory ID) to the bucket. You can have up to 1,000 inventory configurations per bucket. Amazon S3 inventory generates inventories of the objects in the bucket on a daily or weekly basis, and the results are published to a flat file. The bucket that is inventoried is called the source bucket, and the bucket where the inventory flat file is stored is called the destination bucket. The destination bucket must be in the same Amazon Web Services Region as the source bucket. When you configure an inventory for a source bucket, you specify the destination bucket where you want the inventory to be stored, and whether to generate the inventory daily or weekly. You can also configure what object metadata to include and whether to inventory all object versions or only current versions. For more information, see Amazon S3 Inventory in the Amazon S3 User Guide. You must create a bucket policy on the destination bucket to grant permissions to Amazon S3 to write objects to the bucket in the defined location. For an example policy, see Granting Permissions for Amazon S3 Inventory and Storage Class Analysis.
Permissions
To use this operation, you must have permission to perform the s3:PutInventoryConfiguration action. The bucket owner has this permission by default and can grant this permission to others. The s3:PutInventoryConfiguration permission allows a user to create an S3 Inventory report that includes all object metadata fields available and to specify the destination bucket to store the inventory. A user with read access to objects in the destination bucket can also access all object metadata fields that are available in the inventory report. To restrict access to an inventory report, see Restricting access to an Amazon S3 Inventory report in the Amazon S3 User Guide. For more information about the metadata fields available in S3 Inventory, see Amazon S3 Inventory lists in the Amazon S3 User Guide. For more information about permissions, see Permissions related to bucket subresource operations and Identity and access management in Amazon S3 in the Amazon S3 User Guide.
PutBucketInventoryConfiguration has the following special errors:
HTTP 400 Bad Request Error
Code: InvalidArgument Cause: Invalid Argument
HTTP 400 Bad Request Error
Code: TooManyConfigurations Cause: You are attempting to create a new configuration but have already reached the 1,000-configuration limit.
HTTP 403 Forbidden Error
Cause: You are not the owner of the specified bucket, or you do not have the s3:PutInventoryConfiguration bucket permission to set the configuration on the bucket.
The following operations are related to PutBucketInventoryConfiguration:

Parameters

-BucketName <String>
The name of the bucket where the inventory configuration will be stored.
Required?False
Position?1
Accept pipeline input?True (ByValue, ByPropertyName)
-ClientConfig <AmazonS3Config>
Amazon.PowerShell.Cmdlets.S3.AmazonS3ClientCmdlet.ClientConfig
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-ExpectedBucketOwner <String>
The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
This parameter overrides confirmation prompts to force the cmdlet to continue its operation. This parameter should always be used with caution.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-ForcePathStyleAddressing <Boolean>
S3 requests can be performed using one of two URI styles: Virtual or Path. When using Virtual style, the bucket is included as part of the hostname. When using Path style the bucket is included as part of the URI path. The default value is $true when the EndpointUrl parameter is specified, $false otherwise.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-InventoryConfiguration_IncludedObjectVersion <InventoryIncludedObjectVersions>
Object versions to include in the inventory list. If set to All, the list includes all the object versions, which adds the version-related fields VersionId, IsLatest, and DeleteMarker to the list. If set to Current, the list does not contain these version-related fields.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesInventoryConfiguration_IncludedObjectVersions
-InventoryConfiguration_InventoryId <String>
The ID used to identify the inventory configuration.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-InventoryConfiguration_InventoryOptionalField <InventoryOptionalField[]>
Contains the optional fields that are included in the inventory results.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesInventoryConfiguration_InventoryOptionalFields
-InventoryConfiguration_IsEnabled <Boolean>
Specifies whether the inventory is enabled or disabled. If set to True, an inventory list is generated. If set to False, no inventory list is generated.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-InventoryEncryption_SSES3 <SSES3>
Specifies the use of SSE-S3 to encrypt delievered Inventory reports.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesInventoryConfiguration_Destination_S3BucketDestination_InventoryEncryption_SSES3
-InventoryFilter_InventoryFilterPredicate <InventoryFilterPredicate>
Filter Predicate setup for specific filter types.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesInventoryConfiguration_InventoryFilter_InventoryFilterPredicate
-InventoryId <String>
Specifies the inventory Id.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-PassThru <SwitchParameter>
Changes the cmdlet behavior to return the value passed to the BucketName parameter. The -PassThru parameter is deprecated, use -Select '^BucketName' instead. This parameter will be removed in a future version.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-S3BucketDestination_AccountId <String>
The ID of the account that owns the destination bucket.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesInventoryConfiguration_Destination_S3BucketDestination_AccountId
-S3BucketDestination_BucketName <String>
The Amazon resource name (ARN) of the bucket where inventory results will be published.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesInventoryConfiguration_Destination_S3BucketDestination_BucketName
-S3BucketDestination_InventoryFormat <InventoryFormat>
Specifies the output format of the inventory results.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesInventoryConfiguration_Destination_S3BucketDestination_InventoryFormat
-S3BucketDestination_Prefix <String>
The prefix that is prepended to all inventory results.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesInventoryConfiguration_Destination_S3BucketDestination_Prefix
-Schedule_Frequency <InventoryFrequency>
Specifies how frequently inventory results are produced.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesInventoryConfiguration_Schedule_Frequency
-Select <String>
Use the -Select parameter to control the cmdlet output. The cmdlet doesn't have a return value by default. Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.S3.Model.PutBucketInventoryConfigurationResponse). Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-SSEKMS_KeyId <String>
Specifies the ID of the Amazon Web Services Key Management Service (Amazon Web Services KMS) symmetric encryption customer managed key to use for encrypting inventory reports.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesInventoryConfiguration_Destination_S3BucketDestination_InventoryEncryption_SSEKMS_KeyId
-UseAccelerateEndpoint <SwitchParameter>
Enables S3 accelerate by sending requests to the accelerate endpoint instead of the regular region endpoint. To use this feature, the bucket name must be DNS compliant and must not contain periods (.).
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-UseDualstackEndpoint <SwitchParameter>
Configures the request to Amazon S3 to use the dualstack endpoint for a region. S3 supports dualstack endpoints which return both IPv6 and IPv4 values. The dualstack mode of Amazon S3 cannot be used with accelerate mode.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)

Common Credential and Region Parameters

-AccessKey <String>
The AWS access key for the user account. This can be a temporary access key if the corresponding session token is supplied to the -SessionToken parameter.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesAK
-Credential <AWSCredentials>
An AWSCredentials object instance containing access and secret key information, and optionally a token for session-based credentials.
Required?False
Position?Named
Accept pipeline input?True (ByValue, ByPropertyName)
-EndpointUrl <String>
The endpoint to make the call against.Note: This parameter is primarily for internal AWS use and is not required/should not be specified for normal usage. The cmdlets normally determine which endpoint to call based on the region specified to the -Region parameter or set as default in the shell (via Set-DefaultAWSRegion). Only specify this parameter if you must direct the call to a specific custom endpoint.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-NetworkCredential <PSCredential>
Used with SAML-based authentication when ProfileName references a SAML role profile. Contains the network credentials to be supplied during authentication with the configured identity provider's endpoint. This parameter is not required if the user's default network identity can or should be used during authentication.
Required?False
Position?Named
Accept pipeline input?True (ByValue, ByPropertyName)
-ProfileLocation <String>
Used to specify the name and location of the ini-format credential file (shared with the AWS CLI and other AWS SDKs)If this optional parameter is omitted this cmdlet will search the encrypted credential file used by the AWS SDK for .NET and AWS Toolkit for Visual Studio first. If the profile is not found then the cmdlet will search in the ini-format credential file at the default location: (user's home directory)\.aws\credentials.If this parameter is specified then this cmdlet will only search the ini-format credential file at the location given.As the current folder can vary in a shell or during script execution it is advised that you use specify a fully qualified path instead of a relative path.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesAWSProfilesLocation, ProfilesLocation
-ProfileName <String>
The user-defined name of an AWS credentials or SAML-based role profile containing credential information. The profile is expected to be found in the secure credential file shared with the AWS SDK for .NET and AWS Toolkit for Visual Studio. You can also specify the name of a profile stored in the .ini-format credential file used with the AWS CLI and other AWS SDKs.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesStoredCredentials, AWSProfileName
-Region <Object>
The system name of an AWS region or an AWSRegion instance. This governs the endpoint that will be used when calling service operations. Note that the AWS resources referenced in a call are usually region-specific.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesRegionToCall
-SecretKey <String>
The AWS secret key for the user account. This can be a temporary secret key if the corresponding session token is supplied to the -SessionToken parameter.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesSK, SecretAccessKey
-SessionToken <String>
The session token if the access and secret keys are temporary session-based credentials.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesST

Outputs

This cmdlet does not generate any output.The service response (type Amazon.S3.Model.PutBucketInventoryConfigurationResponse) can be referenced from properties attached to the cmdlet entry in the $AWSHistory stack.

Supported Version

AWS Tools for PowerShell: 2.x.y.z